From 0106842e64cad17e259499fed7f77927f41cc5d2 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Thu, 29 Jun 2006 00:36:01 +0000 Subject: [PATCH] * (bug 6201) Treat spaces as underscores in parameters to {{ns:}} --- RELEASE-NOTES | 1 + includes/Parser.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 33c048708e..f100a7fa92 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -598,6 +598,7 @@ Some default configuration options have changed: * (bug 6479) Allow specification of the skin to use during HTML dumps * (bug 6461) Link to page histories in Special:Newpages * (bug 6484) Don't do message transformations when preloading messages for editing +* (bug 6201) Treat spaces as underscores in parameters to {{ns:}} == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index cf692c98c8..c6098d559d 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -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; -- 2.20.1