mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-12 05:44:06 +00:00
use unescaped unicode in json where supported by PHP
This commit is contained in:
@@ -671,7 +671,10 @@
|
|||||||
function javascript_renderData($xVal)
|
function javascript_renderData($xVal)
|
||||||
{
|
{
|
||||||
header("Access-Control-Allow-Origin: *");
|
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']))
|
if( ! isset($_GET['json_callback']))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user