From 987b6a70c999c76ffd4238575a2553370e16843e Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 29 Mar 2015 12:55:12 +0200 Subject: [PATCH] use unescaped unicode in json where supported by PHP --- lib/lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lib.php b/lib/lib.php index df65848d..2f94c25c 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -671,7 +671,10 @@ function javascript_renderData($xVal) { header("Access-Control-Allow-Origin: *"); - $jsonout = json_encode($xVal); + $iOptions = 0; + if (defined('PHP_VERSION_ID') && PHP_VERSION_ID > 50400) + $iOptions = JSON_UNESCAPED_UNICODE; + $jsonout = json_encode($xVal, $iOptions); if( ! isset($_GET['json_callback'])) { -- 2.39.5