From 4c1f4be3f4e167359feb199864e9e4c931fd5760 Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 5 Dec 2008 11:01:29 +0000 Subject: [PATCH] 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
---
 functions/mime.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
         }
-- 
2.25.1