* (bug 6201) Treat spaces as underscores in parameters to {{ns:}}
[lhc/web/wiklou.git] / includes / Parser.php
index cf692c9..c6098d5 100644 (file)
@@ -2673,7 +2673,8 @@ class Parser
                                        $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;