From: Gabriel Wicke Date: Fri, 24 Mar 2006 16:40:31 +0000 (+0000) Subject: Fix bug 2095: three closing brackets X-Git-Tag: 1.6.0~154 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=8774b03482f28b7665a191d75bc2ebabdef84283;p=lhc%2Fweb%2Fwiklou.git Fix bug 2095: three closing brackets --- diff --git a/includes/Parser.php b/includes/Parser.php index 33bfadfa06..1c8eca9c6a 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1407,7 +1407,11 @@ class Parser # Still some problems for cases where the ] is meant to be outside punctuation, # and no image is in sight. See bug 2095. # - if( $text !== '' && preg_match( "/^\](.*)/s", $m[3], $n ) ) { + if( $text !== '' && + preg_match( "/^\](.*)/s", $m[3], $n ) && + strpos($text, '[') !== false + ) + { $text .= ']'; # so that replaceExternalLinks($text) works later $m[3] = $n[1]; }