Actually replace all underscores in wikilink target

Change-Id: I633f8d6e4f639aff90fd456600376b7c6515fd50
This commit is contained in:
Gabriel Wicke 2012-06-04 11:48:59 +02:00
parent 3f2c72f920
commit 2774e5aa6c

View file

@ -123,7 +123,7 @@ WSP._linkHandler = function( state, token ) {
if ( attribDict.rel && attribDict.href !== undefined ) { if ( attribDict.rel && attribDict.href !== undefined ) {
var target = decodeURIComponent( var target = decodeURIComponent(
attribDict.href.substr( state.env.wgScriptPath.length + 1 ) attribDict.href.substr( state.env.wgScriptPath.length + 1 )
.replace( '_', ' ' ) .replace( /_/g, ' ' )
); );
if ( attribDict.rel === 'mw:wikiLink' ) { if ( attribDict.rel === 'mw:wikiLink' ) {