summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_utils.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-10-04 09:40:37 +0200
committerAleksander Machniak <alec@alec.pl>2013-10-04 09:40:37 +0200
commitaf79a7b837151af793b5bd2788de3635ab96b1e3 (patch)
treee8cb641f31c0a2881de8e19cc54e6ad019d06637 /program/lib/Roundcube/rcube_utils.php
parenteafd5b1aa4e67c4de18fc09493540b55dc647220 (diff)
Fixed issues where HTML comments inside style tag would hang Internet Explorer
Diffstat (limited to 'program/lib/Roundcube/rcube_utils.php')
-rw-r--r--program/lib/Roundcube/rcube_utils.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/program/lib/Roundcube/rcube_utils.php b/program/lib/Roundcube/rcube_utils.php
index 50ac850fc..c1ad3823b 100644
--- a/program/lib/Roundcube/rcube_utils.php
+++ b/program/lib/Roundcube/rcube_utils.php
@@ -477,9 +477,9 @@ class rcube_utils
// 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',
),
@@ -491,9 +491,9 @@ class rcube_utils
$source);
// put block contents back in
- $styles = $replacements->resolve($styles);
+ $source = $replacements->resolve($source);
- return $styles;
+ return $source;
}