mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Percent-encode spaces in URLs, so that they are recognized as valid URLs later
on.
This commit is contained in:
parent
7518db8197
commit
39017dd769
Notes:
Gabriel Wicke
2012-03-08 11:53:15 +00:00
|
@ -280,7 +280,7 @@ MWParserEnvironment.prototype.sanitizeURI = function ( s ) {
|
|||
host = host.replace( /%(?![0-9a-fA-F][0-9a-fA-F])|[#|]/g, function ( m ) {
|
||||
return encodeURIComponent( m );
|
||||
} );
|
||||
path = path.replace( /%(?![0-9a-fA-F][0-9a-fA-F])|[\[\]#|]/g, function ( m ) {
|
||||
path = path.replace( /%(?![0-9a-fA-F][0-9a-fA-F])|[ \[\]#|]/g, function ( m ) {
|
||||
return encodeURIComponent( m );
|
||||
} );
|
||||
s = host + path;
|
||||
|
|
Loading…
Reference in a new issue