[Svn] r3706 - trunk/roundcubemail/program/lib

trac at roundcube.net trac at roundcube.net
Thu Jun 3 14:22:41 CEST 2010


Author: alec
Date: 2010-06-03 07:22:41 -0500 (Thu, 03 Jun 2010)
New Revision: 3706

Modified:
   trunk/roundcubemail/program/lib/html2text.php
Log:
- Add line-break in place of <DIV> tag (#1486666)


Modified: trunk/roundcubemail/program/lib/html2text.php
===================================================================
--- trunk/roundcubemail/program/lib/html2text.php	2010-06-03 09:12:44 UTC (rev 3705)
+++ trunk/roundcubemail/program/lib/html2text.php	2010-06-03 12:22:41 UTC (rev 3706)
@@ -148,7 +148,6 @@
         '/[ ]{2,}/',                             // Runs of spaces, pre-handling
         '/<script[^>]*>.*?<\/script>/i',         // <script>s -- which strip_tags supposedly has problems with
         '/<style[^>]*>.*?<\/style>/i',           // <style>s -- which strip_tags supposedly has problems with
-        //'/<!-- .* -->/',                         // Comments -- which strip_tags might have problem a with
         '/<p[^>]*>/i',                           // <P>
         '/<br[^>]*>/i',                          // <br>
         '/<i[^>]*>(.*?)<\/i>/i',                 // <i>
@@ -158,6 +157,7 @@
         '/<li[^>]*>(.*?)<\/li>/i',               // <li> and </li>
         '/<li[^>]*>/i',                          // <li>
         '/<hr[^>]*>/i',                          // <hr>
+        '/<div[^>]*>/i',                         // <div>
         '/(<table[^>]*>|<\/table>)/i',           // <table> and </table>
         '/(<tr[^>]*>|<\/tr>)/i',                 // <tr> and </tr>
         '/<td[^>]*>(.*?)<\/td>/i',               // <td> and </td>
@@ -192,8 +192,7 @@
         ' ',                                    // Runs of spaces, pre-handling
         '',                                     // <script>s -- which strip_tags supposedly has problems with
         '',                                     // <style>s -- which strip_tags supposedly has problems with
-        //'',                                     // Comments -- which strip_tags might have problem a with
-        "\n\n",                               // <P>
+        "\n\n",                                 // <P>
         "\n",                                   // <br>
         '_\\1_',                                // <i>
         '_\\1_',                                // <em>
@@ -202,6 +201,7 @@
         "\t* \\1\n",                            // <li> and </li>
         "\n\t* ",                               // <li>
         "\n-------------------------\n",        // <hr>
+        "<div>\n",                                   // <div>
         "\n\n",                                 // <table> and </table>
         "\n",                                   // <tr> and </tr>
         "\t\t\\1\n",                            // <td> and </td>

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



More information about the Svn mailing list