From bc6ac4d3c99c55d6b7cb8a3533f62ba5493165e1 Mon Sep 17 00:00:00 2001 From: alecpl <alec@alec.pl> Date: Mon, 23 Nov 2009 05:46:49 -0500 Subject: [PATCH] - Fix unicode para and line separators in javascript response (#1486310) --- program/include/main.inc | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/program/include/main.inc b/program/include/main.inc index bf6fd7b..89ae1b9 100644 --- a/program/include/main.inc +++ b/program/include/main.inc @@ -485,12 +485,15 @@ $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 -- Gitblit v1.9.1