* (bug 30441) getParamValue must understand "+" encoding of space
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 23 Aug 2011 20:17:49 +0000 (20:17 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 23 Aug 2011 20:17:49 +0000 (20:17 +0000)
commitd2a1d2dba21a4cdad7a906f4d6e03e5ea0d9d0b5
tree28ade2abb6da3160c9896210796a599a3b61ed42
parentf4f41e9273af452aebf8a2a9b2b9cc79a4f74295
* (bug 30441) getParamValue must understand "+" encoding of space

$.param() produces query string form encoding using the traditional '+' encoding for space; mediawiki.util.getParamValue() was using only decodeURIComponent() to do unescaping, which is not required by spec to handle '+'. Explicitly replacing '+' with '%20' before the decode nicely resolves this.

Added a test case to qunit tests for mediawiki.util module.
resources/mediawiki/mediawiki.util.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js