Last modified: 2011-07-30 07:40:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29427, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27427 - mw.util.getParamValue shouldn't return value from hash even if param is only present in hash
mw.util.getParamValue shouldn't return value from hash even if param is only ...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.18.x
All All
: Normal normal (vote)
: ---
Assigned To: Krinkle
: patch, patch-reviewed
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-15 08:34 UTC by Michael M.
Modified: 2011-07-30 07:40 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Proposed patch (1.74 KB, patch)
2011-07-30 07:25 UTC, Michael M.
Details

Description Michael M. 2011-02-15 08:34:56 UTC
mw.util.getParamValue( "foo", "http://mw.org/#&foo=bad" ) returns 'bad' istead of null.

Anchoring the regular expression at the beginning of the string should solve this.
Comment 1 Michael M. 2011-07-30 07:25:24 UTC
Created attachment 8847 [details]
Proposed patch

The patch also includes a qunit test to confirm the correct behavior.
Comment 2 Krinkle 2011-07-30 07:28:42 UTC
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.
Comment 3 Krinkle 2011-07-30 07:40:42 UTC
Unit test + credits added in r93516. Fix in r93517.

Marking fixes. Thanks!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links