From 4b0f65a597c8339b513bc44e16a95f3803c26369 Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 18 Nov 2005 15:32:20 +0000 Subject: Fixed minor bugs --- program/include/rcube_imap.inc | 12 +++++++++--- program/include/rcube_shared.inc | 10 ++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'program/include') diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc index 44ef24830..2237b38f3 100644 --- a/program/include/rcube_imap.inc +++ b/program/include/rcube_imap.inc @@ -987,6 +987,12 @@ class rcube_imap function decode_header($input) + { + return $this->decode_mime_string($input); + } + + + function decode_mime_string($input) { $out = ''; @@ -1002,8 +1008,8 @@ class rcube_imap $encstr = substr($input, $pos+2, ($end_pos-$pos-2)); $rest = substr($input, $end_pos+2); - $out .= $this->decode_mime_string($encstr); - $out .= $this->decode_header($rest); + $out .= rcube_imap::_decode_mime_string_part($encstr); + $out .= rcube_imap::decode_mime_string($rest); return $out; } @@ -1012,7 +1018,7 @@ class rcube_imap } - function decode_mime_string($str) + function _decode_mime_string_part($str) { $a = explode('?', $str); $count = count($a); diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc index 8d26d56c4..400e345c0 100644 --- a/program/include/rcube_shared.inc +++ b/program/include/rcube_shared.inc @@ -1208,8 +1208,14 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) { if (!$html_encode_arr) { - $html_encode_arr = $CHARSET=='ISO-8859-1' ? get_html_translation_table(HTML_ENTITIES) : get_html_translation_table(HTML_SPECIALCHARS); - $html_encode_arr[chr(128)] = '€'; + if ($CHARSET=='ISO-8859-1') + { + $html_encode_arr = get_html_translation_table(HTML_ENTITIES); + $html_encode_arr[chr(128)] = '€'; + } + else + $html_encode_arr = get_html_translation_table(HTML_SPECIALCHARS); + unset($html_encode_arr['?']); unset($html_encode_arr['&']); } -- cgit v1.2.3