From: Krinkle Date: Sat, 30 Jul 2011 07:39:01 +0000 (+0000) Subject: Adding fix for bug 27427. Fixes unit test. Patch provided by Michael M. through BugZilla. X-Git-Tag: 1.31.0-rc.0~28539 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=190a832501dd44ce75852abb49158e6e9a55527f;p=lhc%2Fweb%2Fwiklou.git Adding fix for bug 27427. Fixes unit test. Patch provided by Michael M. through BugZilla. * (bug 27427) mw.util.getParamValue shouldn't return value from hash even if param is only present in hash. (Follows-up r93516) --- diff --git a/resources/mediawiki/mediawiki.util.js b/resources/mediawiki/mediawiki.util.js index a3986d7b8f..86bddfd836 100644 --- a/resources/mediawiki/mediawiki.util.js +++ b/resources/mediawiki/mediawiki.util.js @@ -223,7 +223,7 @@ 'getParamValue' : function( param, url ) { url = url ? url : document.location.href; // Get last match, stop at hash - var re = new RegExp( '[^#]*[&?]' + $.escapeRE( param ) + '=([^&#]*)' ); + var re = new RegExp( '^[^#]*[&?]' + $.escapeRE( param ) + '=([^&#]*)' ); var m = re.exec( url ); if ( m && m.length > 1 ) { return decodeURIComponent( m[1] );