summaryrefslogtreecommitdiff
path: root/program/include
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-04-08 07:08:30 +0000
committeralecpl <alec@alec.pl>2011-04-08 07:08:30 +0000
commitdd0ae6297be8cd9bcf8d91dd8a3fab34048c3612 (patch)
tree802ee61e036ceb5efa5bffc6ae51e2116682b0e5 /program/include
parent6491fbdbae0a2a6e747e283bae0f511ce852c0e9 (diff)
- Improve space-stuffing handling in format=flowed messages (#1487861)
Diffstat (limited to 'program/include')
-rw-r--r--program/include/rcube_message.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/include/rcube_message.php b/program/include/rcube_message.php
index a8c51cc4e..4f9a2f230 100644
--- a/program/include/rcube_message.php
+++ b/program/include/rcube_message.php
@@ -726,7 +726,9 @@ class rcube_message
$line = $prefix . rc_wordwrap($line, $length - $level - 2, " \r\n$prefix ");
}
else if ($line) {
- $line = ' ' . rc_wordwrap(rtrim($line), $length - 2, " \r\n ");
+ $line = rc_wordwrap(rtrim($line), $length - 2, " \r\n");
+ // space-stuffing
+ $line = preg_replace('/(^|\r\n)(From| |>)/', '\\1 \\2', $line);
}
$text[$idx] = $line;