From 21e724153e80249d0b0f0aaa2f730ad2c045532c Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Tue, 22 Jul 2008 04:01:42 -0400 Subject: [PATCH] Improve HTML sanitization with washtml --- program/steps/mail/get.inc | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/program/steps/mail/get.inc b/program/steps/mail/get.inc index 4d78952..842c605 100644 --- a/program/steps/mail/get.inc +++ b/program/steps/mail/get.inc @@ -65,6 +65,8 @@ header("Cache-Control: private", false); header("Content-Type: application/octet-stream"); } + else if ($ctype_primary == 'text') + header("Content-Type: text/$ctype_secondary; charset=" . RCMAIL_CHARSET); else header("Content-Type: $mimetype"); @@ -95,7 +97,7 @@ $part->body = $MESSAGE->get_part_content($part->mime_id); $OUTPUT = new rcube_html_page(); - $OUTPUT->write(rcmail_print_body($part, $MESSAGE->is_safe)); + $OUTPUT->write(rcmail_print_body($part, array('safe' => $MESSAGE->is_safe, 'inline_html' => false))); } else { header(sprintf('Content-Disposition: %s; filename="%s";', -- Gitblit v1.9.1