]> git.donarmstrong.com Git - roundcube.git/blobdiff - program/lib/washtml.php
Imported Upstream version 0.5.2+dfsg
[roundcube.git] / program / lib / washtml.php
index 0f8dc7ee614863ec35cf0fd5f638d8b19510c973..e8befe835e92934d4247875cf8760d237af5cec0 100644 (file)
@@ -273,7 +273,8 @@ class washtml
       $this->config['base_url'] = '';
 
     // Remove invalid HTML comments (#1487759)
-    $html = preg_replace('/<!--[^->]*>/', '', $html);
+    // Don't remove valid conditional comments
+    $html = preg_replace('/<!--[^->[]*>/', '', $html);
 
     @$node->loadHTML($html);
     return $this->dumpHtml($node);