$text = $linestart . $wgContLang->getNsText( intval( $part1 ) );
$found = true;
} else {
- $index = Namespace::getCanonicalIndex( strtolower( $part1 ) );
+ $param = str_replace( ' ', '_', strtolower( $part1 ) );
+ $index = Namespace::getCanonicalIndex( strtolower( $param ) );
if ( !is_null( $index ) ) {
$text = $linestart . $wgContLang->getNsText( $index );
$found = true;