From f560d8b4d8df3f9e9301e2067ac49b33c9aa8692 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 5 Dec 2005 07:44:14 +0000 Subject: [PATCH] * (bug 4169) Use $wgLegalTitleChars in pipe trick conversions --- RELEASE-NOTES | 1 + includes/Parser.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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}+)\\)$/"; -- 2.20.1