From: Ævar Arnfjörð Bjarmason Date: Tue, 19 Apr 2005 17:19:52 +0000 (+0000) Subject: * (bug 1300) patch from Michael Keppler to make the regexp eat across newlines. X-Git-Tag: 1.5.0alpha1~237 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=28b4179a3623cc93453fb69ccbb476f02ad2e34f;p=lhc%2Fweb%2Fwiklou.git * (bug 1300) patch from Michael Keppler to make the regexp eat across newlines. --- diff --git a/includes/Parser.php b/includes/Parser.php index f35a47ce9b..456e3af09c 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1155,7 +1155,7 @@ class Parser # [[Image:Foo.jpg|[http://example.com desc]]] <- having three ] in a row fucks up, # the real problem is with the $e1 regex # See bug 1300. - if (preg_match( "/^\](.*)/", $m[3], $n ) ) { + if (preg_match( "/^\](.*)/s", $m[3], $n ) ) { $text .= ']'; # so that replaceExternalLinks($text) works later $m[3] = $n[1]; }