summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-11-23 10:46:49 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2009-11-23 10:46:49 +0000
commit23bddee01865c9714db8f566618b79c5ac7d80f1 (patch)
treed697db5ed8f613e0e45ba46678ff2d32d56d54b8
parentf6f53c0bdd524b6962296d05a2e1d50caac1b602 (diff)
- Fix unicode para and line separators in javascript response (#1486310)
git-svn-id: https://svn.roundcube.net/trunk@3128 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG1
-rw-r--r--roundcubemail/program/include/main.inc5
2 files changed, 5 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 03d1bdb00..2457c3dc2 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG RoundCube Webmail
===========================
+- Fix unicode para and line separators in javascript response (#1486310)
- additional_message_headers: allow unsetting headers, support plugin's config file (#1486268)
- Fix displaying of hidden directories in skins list (#1486301)
- Fix open_basedir restriction error when reading skins list (#1486304)
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['&'] = '&amp;';
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['"'] = '&quot;';
$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))] = '&#8232;';
+ $js_rep_table[chr(hexdec(E2)).chr(hexdec(80)).chr(hexdec(A9))] = '&#8233;';
}
// encode for javascript use