From: tokul Date: Mon, 18 Apr 2005 07:49:46 +0000 (+0000) Subject: adding html message inside iframe X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=84410f31c70332799e662143f030f1384e83e684 adding html message inside iframe git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9334 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/mime.php b/functions/mime.php index b5cfeb1c..09cdec96 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -407,6 +407,12 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma } elseif ($use_iframe && ! $clean) { // $clean is used to remove iframe in printable view. + /** + * If we don't add html message between iframe tags, + * we must detect unsafe images and modify $has_unsafe_images. + */ + $html_body = magicHTML($body, $id, $message, $mailbox); + // creating iframe url $iframeurl=sqm_baseuri().'src/view_html.php?' . 'mailbox=' . $urlmailbox @@ -432,8 +438,12 @@ function formatBody($imap_stream, $message, $color, $wrap_at, $ent_num, $id, $ma .' frameborder="1" marginwidth="0" marginheight="0" scrolling="auto">' . "\n"; // Message for browsers without iframe support - $body.= _("Your browser does not support inline frames. You can view HTML formated message by following below link."); - $body.= "
"._("View HTML Message").""; + //$body.= _("Your browser does not support inline frames. + // You can view HTML formated message by following below link."); + //$body.= "
"._("View HTML Message").""; + + // if browser can't render iframe, it renders html message. + $body.= $html_body; // close iframe $body.="\n";