From 08c39127d3f603501fe628fcadd403a92fb4c8dc Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Sun, 11 Nov 2012 06:28:52 -0500
Subject: [PATCH] Fix bug where leading blanks were stripped from quoted lines (#1488795)

---
 program/steps/mail/func.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 2c6db01..efca65b 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -789,8 +789,8 @@
 
   // find/mark quoted lines...
   for ($n=0, $cnt=count($body); $n < $cnt; $n++) {
-    if ($body[$n][0] == '>' && preg_match('/^(>+\s*)+/', $body[$n], $regs)) {
-      $q = strlen(preg_replace('/\s/', '', $regs[0]));
+    if ($body[$n][0] == '>' && preg_match('/^(>+ {0,1})+/', $body[$n], $regs)) {
+      $q        = substr_count($regs[0], '>');
       $body[$n] = substr($body[$n], strlen($regs[0]));
 
       if ($q > $quote_level) {

--
Gitblit v1.9.1