From: x2003bruneau Date: Wed, 2 Aug 2006 18:44:33 +0000 (+0000) Subject: Fix infinite loop if quotation reach last line of the post X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=f0d8d46d2ace65fa202a31fd756463352c3bf560;p=banana.git Fix infinite loop if quotation reach last line of the post git-svn-id: svn+ssh://murphy/home/svn/banana/trunk@129 9869982d-c50d-0410-be91-f2a2ec7c7c7b --- diff --git a/banana/misc.inc.php b/banana/misc.inc.php index df81a6d..ccc309b 100644 --- a/banana/misc.inc.php +++ b/banana/misc.inc.php @@ -626,7 +626,7 @@ function formatbody($_text, $format='plain', $flowed=false) $sign = '
'; } else { while (preg_match("@(^|
|\n)>@i", $res)) {
-            $res  = preg_replace("@(^|
|\n)((>[^\n]*\n)+)@ie",
+            $res  = preg_replace("@(^|
|\n)((>[^\n]*(?:\n|$))+)@ie",
                 "'\\1
'"
                 ." . replaceQuotes('\\2')"
                 ." . '
'",