diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-01-21 07:55:09 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-01-21 07:55:09 +0000 |
| commit | 5f92ac313fd0d9da56d0719c365519d51a3576b6 (patch) | |
| tree | a77231a25f72a3c45f7713388ede682056383a8c /roundcubemail/program | |
| parent | ca4644882e54c3126dd305b0b95d030a83d4842e (diff) | |
- Fix html entities replacement (related to r2186)
git-svn-id: https://svn.roundcube.net/trunk@2248 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/lib/html2text.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/roundcubemail/program/lib/html2text.php b/roundcubemail/program/lib/html2text.php index e2a5b241e..b00c28abc 100644 --- a/roundcubemail/program/lib/html2text.php +++ b/roundcubemail/program/lib/html2text.php @@ -176,7 +176,6 @@ class html2text '/&(bull|#149|#8226);/i', // Bullet '/&(pound|#163);/i', // Pound sign '/&(euro|#8364);/i', // Euro sign - '/&[^&;]+;/i', // Unknown/unhandled entities '/[ ]{2,}/' // Runs of spaces, post-handling ); @@ -220,7 +219,6 @@ class html2text '*', '£', 'EUR', // Euro sign. € ? - '', // Unknown/unhandled entities ' ' // Runs of spaces, post-handling ); @@ -475,6 +473,9 @@ class html2text // Replace known html entities $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8'); + // Remove unknown/unhandled entities (this cannot be done in search-and-replace block) + $text = preg_replace('/&[^&;]+;/i', '', $text); + // Strip any other HTML tags $text = strip_tags($text, $this->allowed_tags); |
