diff options
| author | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-18 11:50:19 +0000 |
|---|---|---|
| committer | thomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2010-06-18 11:50:19 +0000 |
| commit | 6858dee80c2e63fdb9d1e6af1477e12eb668e272 (patch) | |
| tree | 47f5aa9d31fba1399802c7324e12c3715a7fb32f /roundcubemail | |
| parent | ff2c9342cd839a89c17dca058704a60d25a1940e (diff) | |
Strip comments in css string + don't set font color to tags
git-svn-id: https://svn.roundcube.net/trunk@3760 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail')
| -rw-r--r-- | roundcubemail/program/include/main.inc | 5 | ||||
| -rw-r--r-- | roundcubemail/skins/default/common.css | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index cd53854ca..7c506d9e6 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -830,6 +830,9 @@ function rcmail_mod_css_styles($source, $container_id) if (preg_match('/expression|behavior|url\(|import/', $stripped)) return '/* evil! */'; + // remove css comments (sometimes used for some ugly hacks) + $source = preg_replace('!/\*(.+)\*/!Ums', '', $source); + // cut out all contents between { and } while (($pos = strpos($source, '{', $last_pos)) && ($pos2 = strpos($source, '}', $pos))) { @@ -837,7 +840,7 @@ function rcmail_mod_css_styles($source, $container_id) $source = substr($source, 0, $pos+1) . $replacements->get_replacement($key) . substr($source, $pos2, strlen($source)-$pos2); $last_pos = $pos+2; } - + // 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( diff --git a/roundcubemail/skins/default/common.css b/roundcubemail/skins/default/common.css index 583f8a157..baa46b424 100644 --- a/roundcubemail/skins/default/common.css +++ b/roundcubemail/skins/default/common.css @@ -22,7 +22,6 @@ body, td, th, div, p, h3 { font-family: "Lucida Grande", Verdana, Arial, Helvetica, sans-serif; font-size: 12px; - color: #000000; } th |
