Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392759 )

Change subject: makeSpecialUrlSubpage() expects parameter to not be url encoded
......................................................................

makeSpecialUrlSubpage() expects parameter to not be url encoded

It's also not supposed to take a subpage at all (Triggers a warning
about aliases when $wgDevelopmentalWarnings is on) so replace with
makeSpecialUrlSubpage.

This fixes issue where Contributors extension didn't work on pages
containing apostrophes or non-ascii characters.

Bug: T152492
Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
(cherry picked from commit 4bff21a5c09aeab2d1b492841d3360f31f9d52f7)
---
M includes/ContributorsHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Contributors 
refs/changes/59/392759/1

diff --git a/includes/ContributorsHooks.php b/includes/ContributorsHooks.php
index 5c203cc..c02fdc0 100644
--- a/includes/ContributorsHooks.php
+++ b/includes/ContributorsHooks.php
@@ -70,8 +70,8 @@
                if ( $skintemplate->getTitle()->getNamespace() === NS_MAIN && 
$revid !== 0 ) {
                        $nav_urls['contributors'] = [
                                'text' => $skintemplate->msg( 
'contributors-toolbox' ),
-                               'href' => $skintemplate->makeSpecialUrl(
-                                       'Contributors/' . wfUrlencode( 
$skintemplate->thispage )
+                               'href' => $skintemplate->makeSpecialUrlSubpage(
+                                       'Contributors', $skintemplate->thispage
                                ),
                        ];
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/392759
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I424703f99adf837f6217872b882d1ea26bfdd123
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Contributors
Gerrit-Branch: REL1_30
Gerrit-Owner: Brian Wolff <bawolff...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to