diff options
| author | robin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-12-29 11:10:00 +0000 |
|---|---|---|
| committer | robin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-12-29 11:10:00 +0000 |
| commit | 097e3924383ff388060e5639dbd53ea1a93da923 (patch) | |
| tree | 13bae2bd75c5cd9acd65fb595b09a05d8255da99 /roundcubemail/program/steps | |
| parent | e1f33b8eb68fe666b426105c189fb8874a01ff5c (diff) | |
Fix HTML parsing (fixes #1484192)
git-svn-id: https://svn.roundcube.net/trunk@439 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/steps')
| -rw-r--r-- | roundcubemail/program/steps/mail/func.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/roundcubemail/program/steps/mail/func.inc b/roundcubemail/program/steps/mail/func.inc index e12208d46..dea6c040e 100644 --- a/roundcubemail/program/steps/mail/func.inc +++ b/roundcubemail/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, '</'.$tag.'>', $pos))) { - $pos2 += 8; + $pos2 += strlen('</'.$tag.'>'); $body = substr($body, 0, $pos) . substr($body, $pos2, strlen($body)-$pos2); $body_lc = strtolower($body); } |
