jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/332873 )
Change subject: Encode titles in event URIs complient to MW rules. ...................................................................... Encode titles in event URIs complient to MW rules. Change-Id: I9b83766f04a5272534acb70b39dab83e8bcb43e8 Depends-On: Iea5051bc413001e58d0d80aecff575ae64d5123e Bug: T155066 --- M EventBus.php 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Mobrovac: Looks good to me, approved jenkins-bot: Verified diff --git a/EventBus.php b/EventBus.php index 498b5bd..50a029e 100644 --- a/EventBus.php +++ b/EventBus.php @@ -142,10 +142,8 @@ */ public static function getArticleURL( $title ) { global $wgCanonicalServer, $wgArticlePath; - // can't use wfUrlencode, because it doesn't encode slashes. RESTBase - // and services expect slashes to be encoded, so encode the whole title - // right away to avoid reencoding it in change-propagation - $titleURL = rawurlencode( $title->getPrefixedDBkey() ); + + $titleURL = wfUrlencode( $title->getPrefixedDBkey() ); // The $wgArticlePath contains '$1' string where the article title should appear. return $wgCanonicalServer . str_replace( '$1', $titleURL, $wgArticlePath ); } @@ -176,7 +174,7 @@ public static function getUserPageURL( $userName ) { global $wgCanonicalServer, $wgArticlePath, $wgContLang; $prefixedUserURL = $wgContLang->getNsText( NS_USER ) . ':' . $userName; - $encodedUserURL = rawurlencode( strtr( $prefixedUserURL, ' ', '_' ) ); + $encodedUserURL = wfUrlencode( strtr( $prefixedUserURL, ' ', '_' ) ); // The $wgArticlePath contains '$1' string where the article title should appear. return $wgCanonicalServer . str_replace( '$1', $encodedUserURL, $wgArticlePath ); } -- To view, visit https://gerrit.wikimedia.org/r/332873 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b83766f04a5272534acb70b39dab83e8bcb43e8 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/EventBus Gerrit-Branch: master Gerrit-Owner: Ppchelko <ppche...@wikimedia.org> Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits