summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-04-20 09:10:51 +0000
committeralecpl <alec@alec.pl>2011-04-20 09:10:51 +0000
commit164b45964edc699db9e049dddd91e9de07635fcd (patch)
treede38a1c229ff79edc32188957710cc85bfe6c408
parent05545fed91d76b915c0d9cafa26fc61dc0d6193e (diff)
- Apply r4667 from trunk
-rw-r--r--program/lib/washtml.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/program/lib/washtml.php b/program/lib/washtml.php
index 0f8dc7ee6..e8befe835 100644
--- a/program/lib/washtml.php
+++ b/program/lib/washtml.php
@@ -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);