From f0d8d46d2ace65fa202a31fd756463352c3bf560 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Wed, 2 Aug 2006 18:44:33 +0000 Subject: [PATCH] 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 --- banana/misc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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')"
                 ." . '
'",
-- 
2.1.4