From: Brion Vibber Date: Mon, 5 Dec 2005 07:44:14 +0000 (+0000) Subject: * (bug 4169) Use $wgLegalTitleChars in pipe trick conversions X-Git-Tag: 1.6.0~1012 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=f560d8b4d8df3f9e9301e2067ac49b33c9aa8692;p=lhc%2Fweb%2Fwiklou.git * (bug 4169) Use $wgLegalTitleChars in pipe trick conversions --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b4551e4e6b..98a77fb777 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -297,6 +297,7 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 4167) Fix regression caused by patch for bug 153 * (bug 1850) Additional fixes so existing local and remote images get a blue link even if there's no local description page +* (bug 4169) Use $wgLegalTitleChars in pipe trick conversions === Caveats === diff --git a/includes/Parser.php b/includes/Parser.php index f52dc9be0b..0807bd2a09 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -3120,8 +3120,10 @@ class Parser # Context links: [[|name]] and [[name (context)|]] # - $tc = "[&;%\\-,.\\(\\)' _0-9A-Za-z\\/:\\x80-\\xff]"; - $np = "[&;%\\-,.' _0-9A-Za-z\\/:\\x80-\\xff]"; # No parens + global $wgLegalTitleChars; + $tc = "[$wgLegalTitleChars]"; + $np = str_replace( array( '(', ')' ), array( '', '' ), $tc ); # No parens + $namespacechar = '[ _0-9A-Za-z\x80-\xff]'; # Namespaces can use non-ascii! $conpat = "/^({$np}+) \\(({$tc}+)\\)$/";