Don't escape slashes in json output

Fixes #1256.
This commit is contained in:
Sarah Hoffmann
2018-12-04 22:28:29 +01:00
parent fae8da2bcb
commit e080bdff0f

View File

@@ -68,7 +68,7 @@ function javascript_renderData($xVal, $iOptions = 0)
throw new Exception('Invalid json_callback value', 400); throw new Exception('Invalid json_callback value', 400);
} }
$iOptions |= JSON_UNESCAPED_UNICODE; $iOptions |= JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
if (isset($_GET['pretty']) && in_array(strtolower($_GET['pretty']), array('1', 'true'))) { if (isset($_GET['pretty']) && in_array(strtolower($_GET['pretty']), array('1', 'true'))) {
$iOptions |= JSON_PRETTY_PRINT; $iOptions |= JSON_PRETTY_PRINT;
} }