From eee6d975bd0a8e29756b6b1b234c62548106fed0 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 28 Apr 2009 23:33:28 +0000 Subject: [PATCH] Revert r49653 "Make the link regex non-greedy so that it is possible to add '|' to $wgLegalTitleChars and still be able to pipe links." Pipes would definitely not work in titles. The particular regex change here would for instance break image options if | were added to $wgLegalTitleChars. --- includes/parser/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index d0942d4f2c..0f57d571b2 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1460,7 +1460,7 @@ class Parser if ( !$tc ) { $tc = Title::legalChars() . '#%'; # Match a link having the form [[namespace:link|alternate]]trail - $e1 = "/^([{$tc}]+?)(?:\\|(.+?))?]](.*)\$/sD"; + $e1 = "/^([{$tc}]+)(?:\\|(.+?))?]](.*)\$/sD"; # Match cases where there is no "]]", which might still be images $e1_img = "/^([{$tc}]+)\\|(.*)\$/sD"; } -- 2.20.1