summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-03-24 09:28:59 +0000
committeralecpl <alec@alec.pl>2010-03-24 09:28:59 +0000
commit5799531e3f3c14cce79076c99d5bec47bf910907 (patch)
tree55a480516b0f0a281569713964f5da2dc4f9c925
parentfdf8750708ede5d2ec34c8a8f5acbbac74e1ac60 (diff)
- fix bug in css cleanup of html messages
-rw-r--r--program/steps/mail/func.inc5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index e8600ef55..b2e4af3a2 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -938,7 +938,7 @@ function rcmail_message_body($attrib)
$body = rcmail_print_body($part, array('safe' => $safe_mode, 'plain' => !$CONFIG['prefer_html']));
if ($part->ctype_secondary == 'html')
- $out .= html::div('message-htmlpart', rcmail_html4inline($body, $attrib['id']));
+ $out .= html::div('message-htmlpart', rcmail_html4inline($body, $attrib['id'] . ' div.rcmBody'));
else
$out .= html::div('message-part', $body);
}
@@ -1036,6 +1036,9 @@ function rcmail_html4inline($body, $container_id)
array('<div class="rcmBody"\\1>', '</div>'),
$out);
+ if (!preg_match('/<div class="rcmBody"/', $out))
+ $out = '<div class="rcmBody">' . $out . '</div>';
+
// quote <? of php and xml files that are specified as text/html
$out = preg_replace(array('/<\?/', '/\?>/'), array('&lt;?', '?&gt;'), $out);