From: Remember the dot Date: Sun, 19 Apr 2009 22:20:12 +0000 (+0000) Subject: Make the link regex non-greedy so that it is possible to add '|' to $wgLegalTitleChar... X-Git-Tag: 1.31.0-rc.0~42102 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=0d499494cdbcb8f6e9e84cf5961b56a9aa7f7421;p=lhc%2Fweb%2Fwiklou.git Make the link regex non-greedy so that it is possible to add '|' to $wgLegalTitleChars and still be able to pipe links. This change should have no effect on the default configuration, which does not include '|' in $wgLegalTitleChars because including it still breaks other things. --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 0f57d571b2..d0942d4f2c 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"; }