Aleksander Machniak
2013-10-04 bdc515d35cf75daecbb1a2958bb723a9fc6672be
Fixed issues where HTML comments inside style tag would hang Internet Explorer

Conflicts:

CHANGELOG
3 files modified
11 ■■■■ changed files
CHANGELOG 1 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_utils.php 8 ●●●● patch | view | raw | blame | history
program/lib/Roundcube/rcube_washtml.php 2 ●●● patch | view | raw | blame | history
CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fixed issues where HTML comments inside style tag would hang Internet Explorer
- Fix setting domain in virtualmin password driver (#1489332)
- Hide Delivery Status Notification option when smtp_server is unset (#1489336)
- Display full attachment name using title attribute when name is too long to display (#1489320)
program/lib/Roundcube/rcube_utils.php
@@ -476,9 +476,9 @@
        // remove html comments and add #container to each tag selector.
        // also replace body definition because we also stripped off the <body> tag
        $styles = preg_replace(
        $source = preg_replace(
            array(
                '/(^\s*<!--)|(-->\s*$)/',
                '/(^\s*<\!--)|(-->\s*$)/m',
                '/(^\s*|,\s*|\}\s*)([a-z0-9\._#\*][a-z0-9\.\-_]*)/im',
                '/'.preg_quote($container_id, '/').'\s+body/i',
            ),
@@ -490,9 +490,9 @@
            $source);
        // put block contents back in
        $styles = $replacements->resolve($styles);
        $source = $replacements->resolve($source);
        return $styles;
        return $source;
    }
program/lib/Roundcube/rcube_washtml.php
@@ -429,7 +429,7 @@
        }
        // fix (unknown/malformed) HTML tags before "wash"
        $html = preg_replace_callback('/(<[\/]*)([^\s>]+)/', array($this, 'html_tag_callback'), $html);
        $html = preg_replace_callback('/(<(?!\!)[\/]*)([^\s>]+)/', array($this, 'html_tag_callback'), $html);
        // Remove invalid HTML comments (#1487759)
        // Don't remove valid conditional comments