|
|
@ -539,11 +539,11 @@ class rcube_mime
|
|
|
|
|
|
|
|
|
|
|
|
foreach ($text as $idx => $line) {
|
|
|
|
foreach ($text as $idx => $line) {
|
|
|
|
if ($line != '-- ') {
|
|
|
|
if ($line != '-- ') {
|
|
|
|
if ($line[0] == '>' && preg_match('/^(>+)/', $line, $regs)) {
|
|
|
|
if ($line[0] == '>' && preg_match('/^(>+ {0,1})+/', $line, $regs)) {
|
|
|
|
$prefix = $regs[0];
|
|
|
|
$level = substr_count($regs[0], '>');
|
|
|
|
$level = strlen($prefix);
|
|
|
|
$prefix = str_repeat('>', $level) . ' ';
|
|
|
|
$line = rtrim(substr($line, $level));
|
|
|
|
$line = rtrim(substr($line, strlen($regs[0])));
|
|
|
|
$line = $prefix . self::wordwrap($line, $length - $level - 2, " \r\n$prefix ", false, $charset);
|
|
|
|
$line = $prefix . self::wordwrap($line, $length - $level - 2, " \r\n$prefix", false, $charset);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ($line) {
|
|
|
|
else if ($line) {
|
|
|
|
$line = self::wordwrap(rtrim($line), $length - 2, " \r\n", false, $charset);
|
|
|
|
$line = self::wordwrap(rtrim($line), $length - 2, " \r\n", false, $charset);
|
|
|
|