also need to strip \r if we split on \n, otherwise the <pre> environment
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 5 Dec 2008 11:01:29 +0000 (11:01 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 5 Dec 2008 11:01:29 +0000 (11:01 +0000)
will interpret each \r as an extra newline between lines.

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13359 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index e6781752d284b618f5efac14ca0bf700aac1b96d..ca7f836c0affe9722c52f5b89ecc92b61eea8892 100644 (file)
@@ -291,7 +291,8 @@ function translateText(&$body, $wrap_at, $charset) {
 
     $body_ary = explode("\n", $body);
     for ($i=0; $i < count($body_ary); $i++) {
-        $line = $body_ary[$i];
+        $line = rtrim($body_ary[$i],"\r");
+
         if (strlen($line) - 2 >= $wrap_at) {
             sqWordWrap($line, $wrap_at, $charset);
         }