summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-24 14:51:43 +0000
committeralecpl <alec@alec.pl>2011-11-24 14:51:43 +0000
commite4a4ca19480690193e36e14ef6b9d592e73e9e9c (patch)
treeb24656462bb2ffc33cf2504dd84e571d798d677e /program/steps
parent3875eb68139d878fba2f00bdcaae3c34ebb53da7 (diff)
- Performance improvements
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/func.inc8
1 files changed, 3 insertions, 5 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index a331da284..22ad7d562 100644
--- a/program/steps/mail/func.inc
+++ b/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;
}