From be9f42bf9a749e596771c0d1271a79ca8a0e51b2 Mon Sep 17 00:00:00 2001 From: kink Date: Mon, 21 Aug 2006 19:34:27 +0000 Subject: [PATCH] Provide View Unsafe Images link on viewing a text/html attachment. Thanks `Bicster' git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11619 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- ChangeLog | 1 + src/view_text.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9e9e7ea0..ab855463 100644 --- a/ChangeLog +++ b/ChangeLog @@ -131,6 +131,7 @@ Version 1.5.2 - CVS - Drop obsolete script plugins/make_archive.pl. - Fix misspelled constant PREG_SPLIT_NI_EMPTY in sqimap_get_message (#1543573). + - Provide View Unsafe Images link on viewing a text/html attachment. Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/src/view_text.php b/src/view_text.php index 0b3aeb8a..b032b11a 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -48,6 +48,9 @@ $encoding = strtolower($header->encoding); $msg_url = 'read_body.php?' . $QUERY_STRING; $msg_url = set_url_var($msg_url, 'ent_id', 0); $dwnld_url = '../src/download.php?' . $QUERY_STRING . '&absolute_dl=true'; +$unsafe_url = 'view_text.php?' . $QUERY_STRING; +$unsafe_url = set_url_var($unsafe_url, 'view_unsafe_images', 1); + $body = mime_fetch_body($imapConnection, $passed_id, $ent_id); $body = decodeBody($body, $encoding); @@ -62,10 +65,12 @@ if (isset($languages[$squirrelmail_language]['XTRA_CODE']) && } if ($type1 == 'html' || (isset($override_type1) && $override_type1 == 'html')) { + $ishtml = TRUE; $body = MagicHTML( $body, $passed_id, $message, $mailbox); // html attachment with character set information - if (! empty($charset)) + if (! empty($charset)) { $body = charset_decode($charset,$body,false,true); + } } else { translateText($body, $wrap_at, $charset); } @@ -80,6 +85,9 @@ echo _("Viewing a text attachment") . ' - ' . ?>
' . _("View Unsafe Images") . ' | '; +} echo '' . _("Download this as a file") . ''; ?>

-- 2.25.1