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
if ( $target != '' ) {
$this->setParams( [
- 'query' => $target2,
+ 'query' => Parser::normalizeLinkUrl( $target2 ),
'namespace' => $namespace,
'protocol' => $protocol ] );
parent::execute( $par );