summaryrefslogtreecommitdiff
path: root/program/lib/washtml.php
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-04-19 08:23:31 +0000
committeralecpl <alec@alec.pl>2011-04-19 08:23:31 +0000
commit968754b09ebc1b501d0840e8c4eb3d0f617a5080 (patch)
tree2109e417f3f34a9e7d51060c57d9ba39e34e06df /program/lib/washtml.php
parent462de2d2028617c8464f174987785a92583313be (diff)
- Fix regression in html conditional comments handling by washtml class
Diffstat (limited to 'program/lib/washtml.php')
-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);