BUG#1317 - External links in image caption not working
authorJens Frank <jeluf@users.mediawiki.org>
Thu, 13 Jan 2005 09:13:22 +0000 (09:13 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Thu, 13 Jan 2005 09:13:22 +0000 (09:13 +0000)
Changed regexp to allow single ] inside of an image's alternative text

includes/Parser.php

index 0e0661e..a0f5a1f 100644 (file)
@@ -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"; }