From: Ramunas Geciauskas Date: Tue, 8 Mar 2016 20:31:55 +0000 (-0500) Subject: Normalize user provided URL link for Special:LinkSearch page X-Git-Tag: 1.31.0-rc.0~7645^2 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Category:Foo?a=commitdiff_plain;h=88597cc944e75caa057aa161d7fac26f34f6d488;p=lhc%2Fweb%2Fwiklou.git Normalize user provided URL link for Special:LinkSearch page Using Parser::normalizeLinkUrl() to normalize links before passing them to the Special:LinkSearch handler allows us to avoid URL encoding issues when searching for URL with special/escaped characters. E.g. As listed in T126913 currently user needs to provide URL exactly as it is stored in MediaWiki (' vs %27) in order to find it. Normalizing URL will allow searching in Special:LinkSearch page using both direct and encoded characters (since it will get normalized to the uniform format). Bug: T126913 Change-Id: If17b1896a3f40ba99c78fccb9f69100b2a0f5cba --- diff --git a/includes/specials/SpecialLinkSearch.php b/includes/specials/SpecialLinkSearch.php index bc33b8e053..2a7046ecbd 100644 --- a/includes/specials/SpecialLinkSearch.php +++ b/includes/specials/SpecialLinkSearch.php @@ -158,7 +158,7 @@ class LinkSearchPage extends QueryPage { if ( $target != '' ) { $this->setParams( [ - 'query' => $target2, + 'query' => Parser::normalizeLinkUrl( $target2 ), 'namespace' => $namespace, 'protocol' => $protocol ] ); parent::execute( $par );