]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/include/rcube_message.php
Imported Upstream version 0.5.2+dfsg
[roundcube.git] / program / include / rcube_message.php
index 2f862b79ac6896399137576566384481d02624e4..acf4a4ddd08b4fd86583ba090a507d348b07fd73 100644 (file)
@@ -15,7 +15,7 @@
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 
- $Id: rcube_message.php 4516 2011-02-09 12:46:46Z alec $
+ $Id: rcube_message.php 4643 2011-04-11 12:24:00Z alec $
 
 */
 
@@ -725,7 +725,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;