summaryrefslogtreecommitdiff
path: root/program/lib
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-02-09 10:51:50 +0000
committerthomascube <thomas@roundcube.net>2011-02-09 10:51:50 +0000
commitb46e5b7407940499964d8a553c3eada05850f29d (patch)
tree882ffd6820097107176c1ba2e8341c0313f18ec2 /program/lib
parent98cb0f179206843ceaa87df6bfb3d1da045ed8ad (diff)
Apply more bugfixes from trunk for 0.5.1
Diffstat (limited to 'program/lib')
-rw-r--r--program/lib/washtml.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index 7f49fec28..f9daadbf5 100644
--- a/program/lib/washtml.php
+++ b/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);
}