From 50ebb1e045e4ea2e7135410637285a316d724b87 Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Thu, 13 Jan 2005 09:13:22 +0000 Subject: [PATCH] BUG#1317 - External links in image caption not working Changed regexp to allow single ] inside of an image's alternative text --- includes/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 0e0661e26c..a0f5a1f477 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1152,7 +1152,7 @@ class Parser # Match a link having the form [[namespace:link|alternate]]trail static $e1 = FALSE; - if ( !$e1 ) { $e1 = "/^([{$tc}]+)(?:\\|([^]]+))?]](.*)\$/sD"; } + if ( !$e1 ) { $e1 = "/^([{$tc}]+)(?:\\|(.+?))?]](.*)\$/sD"; } # Match cases where there is no "]]", which might still be images static $e1_img = FALSE; if ( !$e1_img ) { $e1_img = "/^([{$tc}]+)\\|(.*)\$/sD"; } -- 2.20.1