From: Brion Vibber Date: Tue, 28 Apr 2009 23:33:28 +0000 (+0000) Subject: Revert r49653 "Make the link regex non-greedy so that it is possible to add '|' to... X-Git-Tag: 1.31.0-rc.0~41944 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=eee6d975bd0a8e29756b6b1b234c62548106fed0;p=lhc%2Fweb%2Fwiklou.git 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. --- 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"; }