From 1a00f138c6d6903d7fc51dca4ef46dd675aec9fa Mon Sep 17 00:00:00 2001 From: alecpl Date: Mon, 12 Oct 2009 16:06:33 +0000 Subject: - Fix IE issue with non-UTF-8 characters in AJAX response (#1486159) --- program/steps/mail/func.inc | 5 ++++- program/steps/mail/headers.inc | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'program/steps') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index bca2f8cd1..0a8664cde 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -457,7 +457,10 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $replace=TRUE) $a_msg_flags['forwarded'] = 1; if ($header->flagged) $a_msg_flags['flagged'] = 1; - + + if ($browser->ie) + $a_msg_cols = rc_utf8_clean($a_msg_cols); + $OUTPUT->command('add_message_row', $header->uid, $a_msg_cols, diff --git a/program/steps/mail/headers.inc b/program/steps/mail/headers.inc index 653fb9647..4e3f969bd 100644 --- a/program/steps/mail/headers.inc +++ b/program/steps/mail/headers.inc @@ -24,6 +24,11 @@ if ($uid = get_input_value('_uid', RCUBE_INPUT_POST)) if ($source) { + $browser = new rcube_browser; + + if ($browser->ie) + $source = rc_utf8_clean($source); + $source = htmlspecialchars(trim($source)); $source = preg_replace('/\t/', '    ', $source); $source = preg_replace('/^([a-z0-9_:-]+)/im', ''.'\1'.'', $source); -- cgit v1.2.3