Change   > < to they're plain text equivalents. Now when we view text...
authorindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 23 Aug 2002 16:45:41 +0000 (16:45 +0000)
committerindiri69 <indiri69@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 23 Aug 2002 16:45:41 +0000 (16:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3438 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/mime.php

index 7704e9303f3b061005edc705c4560ed5f0e2572c..896933fede17db0bb1d943d42568a37498d8670d 100644 (file)
@@ -154,7 +154,7 @@ function mime_print_body_lines ($imap_stream, $id, $ent_id, $encoding) {
     // Don't kill the connection if the browser is over a dialup
     // and it would take over 30 seconds to download it.
 
-    // don\8e´t call set_time_limit in safe mode.
+    // don´t call set_time_limit in safe mode.
     if (!ini_get("safe_mode")) {
         set_time_limit(0);
     }
@@ -349,9 +349,14 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma
         // them here
         if ($body_message->header->type1 == 'html') {
             if ( $show_html_default <> 1 ) {
+                $entity_conv = array('&nbsp;' => ' ',
+                                     '&gt;'   => '>',
+                                     '&lt;'   => '<');
                 $body = strip_tags( $body );
-                translateText($body, $wrap_at, 
-                 $body_message->header->getParameter['charset']);
+                $body = strtr($body, $entity_conv);
+                $body = trim($body);
+                translateText($body, $wrap_at,
+                              $body_message->header->getParameter['charset']);
             } else {
                 $body = magicHTML( $body, $id, $message, $mailbox );
             }