when extracting the namespace
Bug: T208255
Change-Id: I98206bda9a32e12acc7e515c3396fa823c3cd4f3
$ns = $this->namespaces;
if ( $title && !$title->isExternal() ) {
$ns = [ $title->getNamespace() ];
- $search = $title->getText();
+ if ( $title->getNamespace() !== NS_MAIN ) {
+ $search = substr( $search, strpos( $search, ':' ) + 1 );
+ }
if ( $ns[0] == NS_MAIN ) {
$ns = $this->namespaces; // no explicit prefix, use default namespaces
Hooks::run( 'PrefixSearchExtractNamespace', [ &$ns, &$search ] );