Merge "ApiSandbox: Blur before sending request"
[lhc/web/wiklou.git] / resources / src / mediawiki.special / mediawiki.special.apisandbox.js
index 4159906..a2d106d 100644 (file)
 
                        // I'm surprised this doesn't seem to exist in jQuery or mw.util.
                        params = {};
-                       hash = hash.replace( '+', '%20' );
+                       hash = hash.replace( /\+/g, '%20' );
                        re = /([^&=#]+)=?([^&#]*)/g;
                        while ( ( m = re.exec( hash ) ) ) {
                                params[ decodeURIComponent( m[ 1 ] ) ] = decodeURIComponent( m[ 2 ] );