summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-09-14 10:32:36 +0000
committeralecpl <alec@alec.pl>2010-09-14 10:32:36 +0000
commitf12d218831881cd2ffd356e366050d5d97223248 (patch)
treee5ff38ecd326700200c398ebd885ef4952a1c8ac /program/include
parent33dfdd891b91469d8a0c4e11a88b019cab0335b4 (diff)
- small fix for format=flowed parsing
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_message.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index a15117e19..40df8191b 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -612,7 +612,8 @@ class rcube_message
$q = strlen(str_replace(' ', '', $regs[0]));
$line = substr($line, strlen($regs[0]));
- if ($q == $q_level && isset($text[$last])
+ if ($q == $q_level && $line
+ && isset($text[$last])
&& $text[$last][strlen($text[$last])-1] == ' '
) {
$text[$last] .= $line;
@@ -631,7 +632,7 @@ class rcube_message
// remove space-stuffing
$line = preg_replace('/^\s/', '', $line);
- if (isset($text[$last])
+ if (isset($text[$last]) && $line
&& $text[$last] != '-- '
&& $text[$last][strlen($text[$last])-1] == ' '
) {