summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-11-19 11:46:16 +0100
committerThomas Bruederli <thomas@roundcube.net>2012-11-19 11:46:16 +0100
commit1faa16fc450cb732b0419d7bea47291dea77d042 (patch)
treea0448b0260d3c71b6fa2526068cffc71f6a1fcdf /program
parent810efee4d36da6edbc721c82c3a97966005101de (diff)
parent42b8a60cf33eb3eb768b11b9c94f79b152f75ca5 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'program')
-rw-r--r--program/include/rcube_mime.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/program/include/rcube_mime.php b/program/include/rcube_mime.php
index ac3ef9e8a..48175b46a 100644
--- a/program/include/rcube_mime.php
+++ b/program/include/rcube_mime.php
@@ -539,11 +539,11 @@ class rcube_mime
foreach ($text as $idx => $line) {
if ($line != '-- ') {
- if ($line[0] == '>' && preg_match('/^(>+)/', $line, $regs)) {
- $prefix = $regs[0];
- $level = strlen($prefix);
- $line = rtrim(substr($line, $level));
- $line = $prefix . self::wordwrap($line, $length - $level - 2, " \r\n$prefix ", false, $charset);
+ if ($line[0] == '>' && preg_match('/^(>+ {0,1})+/', $line, $regs)) {
+ $level = substr_count($regs[0], '>');
+ $prefix = str_repeat('>', $level) . ' ';
+ $line = rtrim(substr($line, strlen($regs[0])));
+ $line = $prefix . self::wordwrap($line, $length - $level - 2, " \r\n$prefix", false, $charset);
}
else if ($line) {
$line = self::wordwrap(rtrim($line), $length - 2, " \r\n", false, $charset);