diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-24 14:51:43 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2011-11-24 14:51:43 +0000 |
| commit | fb9e05873a0832c0ab22538bf0612b7abfbb70c5 (patch) | |
| tree | 8237eee04c1450beb36900b0512cb7cad96cb144 /roundcubemail/program/steps/mail | |
| parent | 8b3f0c7fb9485f79298e3a04b4b461dc0a9f756f (diff) | |
- Performance improvements
git-svn-id: https://svn.roundcube.net/trunk@5486 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps/mail')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index a331da284..22ad7d562 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/program/steps/mail/func.inc @@ -1092,20 +1092,18 @@ function rcmail_resolve_base($body) function rcmail_html4inline($body, $container_id, $body_id='', &$attributes=null) { $last_style_pos = 0; - $body_lc = strtolower($body); $cont_id = $container_id.($body_id ? ' div.'.$body_id : ''); // find STYLE tags - while (($pos = strpos($body_lc, '<style', $last_style_pos)) && ($pos2 = strpos($body_lc, '</style>', $pos))) + while (($pos = stripos($body, '<style', $last_style_pos)) && ($pos2 = stripos($body, '</style>', $pos))) { - $pos = strpos($body_lc, '>', $pos)+1; + $pos = strpos($body, '>', $pos)+1; // replace all css definitions with #container [def] $styles = rcmail_mod_css_styles( substr($body, $pos, $pos2-$pos), $cont_id); - $body = substr($body, 0, $pos) . $styles . substr($body, $pos2); - $body_lc = strtolower($body); + $body = substr_replace($body, $styles, $pos, $pos2-$pos); $last_style_pos = $pos2; } |
