summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-06-03 12:22:41 +0000
committeralecpl <alec@alec.pl>2010-06-03 12:22:41 +0000
commitf6b28244a1307a493e0e4dbd8aa3429df53446e5 (patch)
tree8435631e313dac254fe91c1515afcad7dc93aba0 /program/lib
parent997111f49acdb1c54f55fe8d0b01390b76753646 (diff)
- Add line-break in place of <DIV> tag (#1486666)
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/html2text.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/program/lib/html2text.php b/program/lib/html2text.php
index 49c636f3c..572942e21 100644
--- a/program/lib/html2text.php
+++ b/program/lib/html2text.php
@@ -148,7 +148,6 @@ class html2text
'/[ ]{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 @@ class html2text
'/<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 @@ class html2text
' ', // 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 @@ class html2text
"\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>