* (bug 4169) Use $wgLegalTitleChars in pipe trick conversions
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 5 Dec 2005 07:44:14 +0000 (07:44 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 5 Dec 2005 07:44:14 +0000 (07:44 +0000)
RELEASE-NOTES
includes/Parser.php

index b4551e4..98a77fb 100644 (file)
@@ -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 ===
index f52dc9b..0807bd2 100644 (file)
@@ -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}+)\\)$/";