[Svn] r4215 - trunk/roundcubemail/program/include

trac at roundcube.net trac at roundcube.net
Thu Nov 11 14:39:11 CET 2010


Author: alec
Date: 2010-11-11 07:39:10 -0600 (Thu, 11 Nov 2010)
New Revision: 4215

Modified:
   trunk/roundcubemail/program/include/main.inc
Log:
- Fix displaying of text/plain messages containing HTML entities


Modified: trunk/roundcubemail/program/include/main.inc
===================================================================
--- trunk/roundcubemail/program/include/main.inc	2010-11-11 11:33:03 UTC (rev 4214)
+++ trunk/roundcubemail/program/include/main.inc	2010-11-11 13:39:10 UTC (rev 4215)
@@ -556,10 +556,14 @@
       }
     else if ($mode=='remove')
       $str = strip_tags($str);
-    
+
+    $out = strtr($str, $encode_arr);
+
     // avoid douple quotation of &
-    $out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr));
-      
+    // commented out, because this breaks displaying of text with entity strings
+    // in text messages.
+    //$out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', $out);
+
     return $newlines ? nl2br($out) : $out;
     }
 

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list