summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include/rcube_shared.inc
diff options
context:
space:
mode:
authorroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2005-11-15 00:09:44 +0000
committerroundcube <roundcube@208e9e7b-5314-0410-a742-e7e81cd9613c>2005-11-15 00:09:44 +0000
commit0d8a302324a48dfa7fa2451df8acffa962f3e8b8 (patch)
treef21236c84a22f5cb144ff7455c29f40a66862c26 /roundcubemail/program/include/rcube_shared.inc
parent8c3b64d00defbba89f38686297e4e9f43e39fd56 (diff)
SMTPS support and minor bugfixes
git-svn-id: https://svn.roundcube.net/trunk@84 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include/rcube_shared.inc')
-rw-r--r--roundcubemail/program/include/rcube_shared.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/roundcubemail/program/include/rcube_shared.inc b/roundcubemail/program/include/rcube_shared.inc
index 9b1b23bf6..8d26d56c4 100644
--- a/roundcubemail/program/include/rcube_shared.inc
+++ b/roundcubemail/program/include/rcube_shared.inc
@@ -1188,7 +1188,7 @@ function send_future_expire_header()
// replace specials characters to a specific encoding type
function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
{
- global $OUTPUT_TYPE;
+ global $OUTPUT_TYPE, $CHARSET;
static $html_encode_arr, $js_rep_table, $rtf_rep_table, $xml_rep_table;
if (!$enctype)
@@ -1208,7 +1208,7 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
{
if (!$html_encode_arr)
{
- $html_encode_arr = get_html_translation_table(HTML_SPECIALCHARS); // HTML_ENTITIES
+ $html_encode_arr = $CHARSET=='ISO-8859-1' ? get_html_translation_table(HTML_ENTITIES) : get_html_translation_table(HTML_SPECIALCHARS);
$html_encode_arr[chr(128)] = '&euro;';
unset($html_encode_arr['?']);
unset($html_encode_arr['&']);
@@ -1245,9 +1245,11 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE)
for ($c=160; $c<256; $c++) // can be increased to support more charsets
{
$hex = dechex($c);
- //$js_rep_table[Chr($c)] = sprintf("\u%s%s", str_repeat('0', 4-strlen($hex)), $hex);
$rtf_rep_table[Chr($c)] = "\\'$hex";
$xml_rep_table[Chr($c)] = "&#$c;";
+
+ if ($CHARSET=='ISO-8859-1')
+ $js_rep_table[Chr($c)] = sprintf("\u%s%s", str_repeat('0', 4-strlen($hex)), $hex);
}
$js_rep_table['"'] = sprintf("\u%s%s", str_repeat('0', 4-strlen(dechex(34))), dechex(34));