From 23bddee01865c9714db8f566618b79c5ac7d80f1 Mon Sep 17 00:00:00 2001 From: alec Date: Mon, 23 Nov 2009 10:46:49 +0000 Subject: - Fix unicode para and line separators in javascript response (#1486310) git-svn-id: https://svn.roundcube.net/trunk@3128 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/include/main.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'roundcubemail/program/include') diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc index bf6fd7b62..89ae1b97f 100644 --- a/roundcubemail/program/include/main.inc +++ b/roundcubemail/program/include/main.inc @@ -485,12 +485,15 @@ function rep_specialchars_output($str, $enctype='', $mode='', $newlines=TRUE) $xml_rep_table['&'] = '&'; for ($c=160; $c<256; $c++) // can be increased to support more charsets - $xml_rep_table[Chr($c)] = "&#$c;"; + $xml_rep_table[chr($c)] = "&#$c;"; $xml_rep_table['"'] = '"'; $js_rep_table['"'] = '\\"'; $js_rep_table["'"] = "\\'"; $js_rep_table["\\"] = "\\\\"; + // Unicode line and paragraph separators (#1486310) + $js_rep_table[chr(hexdec(E2)).chr(hexdec(80)).chr(hexdec(A8))] = '
'; + $js_rep_table[chr(hexdec(E2)).chr(hexdec(80)).chr(hexdec(A9))] = '
'; } // encode for javascript use -- cgit v1.2.3