From b1d31eea94a8ed9e26ee97ad0e401cb03708d56f Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 09 Feb 2011 11:06:20 -0500
Subject: [PATCH] Fix stripping invalid comments. Changes from r4483 also stripped entire CSS blocks packed in comments

---
 program/lib/washtml.php |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index f9daadb..0f8dc7e 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -273,7 +273,7 @@
       $this->config['base_url'] = '';
 
     // Remove invalid HTML comments (#1487759)
-    $html = preg_replace('/<![^>]*>/', '', $html);
+    $html = preg_replace('/<!--[^->]*>/', '', $html);
 
     @$node->loadHTML($html);
     return $this->dumpHtml($node);

--
Gitblit v1.9.1