From 715c7961ba8ff72fe40720bb4feaa7865e57e8b9 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 01 Mar 2011 16:22:52 -0500
Subject: [PATCH] Don't do exact matches when searching for existing email records
---
program/lib/washtml.php | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index 7f49fec..0f8dc7e 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 @@
else
$this->config['base_url'] = '';
+ // Remove invalid HTML comments (#1487759)
+ $html = preg_replace('/<!--[^->]*>/', '', $html);
+
@$node->loadHTML($html);
return $this->dumpHtml($node);
}
--
Gitblit v1.9.1