From 3b12aeeeca89bbc3d8cc5342beb07643067e3760 Mon Sep 17 00:00:00 2001 From: svncommit Date: Fri, 29 Dec 2006 11:10:00 +0000 Subject: Fix HTML parsing (fixes #1484192) --- program/steps/mail/func.inc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'program/steps/mail/func.inc') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index e12208d46..dea6c040e 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1193,7 +1193,8 @@ function rcmail_mod_html_body($body, $container_id) // replace all css definitions with #container [def] $styles = rcmail_mod_css_styles(substr($body, $pos, $pos2-$pos), $container_id); - $body = substr($body, 0, $pos) . $styles . substr($body, $pos2); + $body = substr($body, 0, $pos) . $styles . substr($body, $pos2); + $body_lc = strtolower($body); $last_style_pos = $pos2; } @@ -1203,7 +1204,7 @@ function rcmail_mod_html_body($body, $container_id) { while (($pos = strpos($body_lc, '<'.$tag)) && ($pos2 = strpos($body_lc, '', $pos))) { - $pos2 += 8; + $pos2 += strlen(''); $body = substr($body, 0, $pos) . substr($body, $pos2, strlen($body)-$pos2); $body_lc = strtolower($body); } -- cgit v1.2.3