* (bug 1300) patch from Michael Keppler to make the regexp eat across newlines.
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 19 Apr 2005 17:19:52 +0000 (17:19 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Tue, 19 Apr 2005 17:19:52 +0000 (17:19 +0000)
includes/Parser.php

index f35a47c..456e3af 100644 (file)
@@ -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];
                                }