From: kink Date: Fri, 5 Dec 2008 11:01:29 +0000 (+0000) Subject: also need to strip \r if we split on \n, otherwise the
 environment
X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=4c1f4be3f4e167359feb199864e9e4c931fd5760

also need to strip \r if we split on \n, otherwise the 
 environment
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
---

diff --git a/functions/mime.php b/functions/mime.php
index e6781752..ca7f836c 100644
--- a/functions/mime.php
+++ b/functions/mime.php
@@ -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);
         }