From: umherirrender Date: Tue, 10 Mar 2015 18:26:39 +0000 (+0100) Subject: Use underscores in help links X-Git-Tag: 1.31.0-rc.0~12128^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=507902203a722cd2868a0c666076457569460e10;p=lhc%2Fweb%2Fwiklou.git Use underscores in help links Replace spaces by underscore to build correct links to wiki pages. IE11 will show %20 for spaces. Also use urlencode to make the url safe. Follow-Up: I2934b1708a0d207dcf3d940264f140613646f203 Change-Id: I5ef08441406e96aa9749476af0a81fc11fa4e4d6 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index aa282a793f..278b4d117f 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1412,7 +1412,8 @@ class OutputPage extends ContextSource { if ( $overrideBaseUrl ) { $helpUrl = $to; } else { - $helpUrl = "//www.mediawiki.org/wiki/Special:MyLanguage/$to"; + $toUrlencoded = wfUrlencode( str_replace( ' ', '_', $to ) ); + $helpUrl = "//www.mediawiki.org/wiki/Special:MyLanguage/$toUrlencoded"; } $link = Html::rawElement( 'a',