diff options
Diffstat (limited to 'program')
-rw-r--r-- | program/lib/html2text.inc | 8 | ||||
-rw-r--r-- | program/lib/imap.inc | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/program/lib/html2text.inc b/program/lib/html2text.inc index 82a254e56..36849a492 100644 --- a/program/lib/html2text.inc +++ b/program/lib/html2text.inc @@ -126,19 +126,18 @@ class html2text '/(<table[^>]*>|<\/table>)/i', // <table> and </table> '/(<tr[^>]*>|<\/tr>)/i', // <tr> and </tr> '/<td[^>]*>(.+?)<\/td>/i', // <td> and </td> - '/<th[^>]*>(.+?)<\/th>/i', // <th> and </th> + '/<th[^>]*>(.+?)<\/th>/ie', // <th> and </th> '/ /i', '/"/i', '/>/i', '/</i', - '/&/i', + '/&(amp|#38);/i', '/©/i', '/™/i', '/“/', '/”/', '/–/', - '/’/', - '/&/', + '/&#(8217|39);/', '/©/', '/™/', '/—/', @@ -188,7 +187,6 @@ class html2text '"', '-', "'", - '&', '(c)', '(tm)', '--', diff --git a/program/lib/imap.inc b/program/lib/imap.inc index b2e1d43c0..caa1d2721 100644 --- a/program/lib/imap.inc +++ b/program/lib/imap.inc @@ -1887,7 +1887,7 @@ function iil_C_HandlePartBody(&$conn, $mailbox, $id, $part, $mode){ $remaining = $bytes - $received; $line = iil_ReadLine($fp, 1024); $len = strlen($line); - if ($len > $remaining) substr($line, 0, $remaining); + if ($len > $remaining) $line = substr($line, 0, $remaining); $received += strlen($line); if ($mode==1) $result .= chop($line)."\n"; else if ($mode==2){ echo chop($line)."\n"; flush(); } |