From 507902203a722cd2868a0c666076457569460e10 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 10 Mar 2015 19:26:39 +0100 Subject: [PATCH] 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 --- includes/OutputPage.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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', -- 2.20.1