Ver código fonte

also need to strip \r if we split on \n, otherwise the <pre> environment
will interpret each \r as an extra newline between lines.

Thijs Kinkhorst 16 anos atrás
pai
commit
b3d411ce07
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      functions/mime.php

+ 2 - 1
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);
         }