diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-03 11:52:38 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-02-03 11:52:38 +0000 |
| commit | 6e3ab8ae0acca60e7e8c6d09fb9509ad4103c0ee (patch) | |
| tree | 1c715c922d9f02cfeba22a28632befe6dda9948e /roundcubemail/program | |
| parent | 36d6586ce42de75cd97856261a58a24d35a87408 (diff) | |
- Fix handling of invalid HTML comments in messages (#1487759)
git-svn-id: https://svn.roundcube.net/trunk@4483 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
| -rw-r--r-- | roundcubemail/program/lib/washtml.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roundcubemail/program/lib/washtml.php b/roundcubemail/program/lib/washtml.php index 7f49fec28..f9daadbf5 100644 --- a/roundcubemail/program/lib/washtml.php +++ b/roundcubemail/program/lib/washtml.php @@ -75,6 +75,7 @@ * - changed $ignore_elements behaviour * - added RFC2397 support * - base URL support + * - invalid HTML comments removal before parsing */ class washtml @@ -271,6 +272,9 @@ class washtml else $this->config['base_url'] = ''; + // Remove invalid HTML comments (#1487759) + $html = preg_replace('/<![^>]*>/', '', $html); + @$node->loadHTML($html); return $this->dumpHtml($node); } |
