Page MenuHomePhabricator

mw.util.getParamValue shouldn't return value from hash even if param is only present in hash
Closed, ResolvedPublic


mw.util.getParamValue( "foo", "" ) returns 'bad' istead of null.

Anchoring the regular expression at the beginning of the string should solve this.

Version: 1.18.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:18 PM
bzimport set Reference to bz27427.

Created attachment 8847
Proposed patch

The patch also includes a qunit test to confirm the correct behavior.


Thanks a lot for this. The patch looks good!

I'll apply locally in a few minutes, test it to be sure and commit.
We can probably get this backported to the 1.18 branch as well since it's a bugfix.

Leaving status "NEW" for now, as it's not fixed yet.

Unit test + credits added in r93516. Fix in r93517.

Marking fixes. Thanks!