]> git.openstreetmap.org Git - nominatim.git/commitdiff
use unescaped unicode in json where supported by PHP
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 29 Mar 2015 10:55:12 +0000 (12:55 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 29 Mar 2015 11:02:21 +0000 (13:02 +0200)
lib/lib.php

index df65848d91f47cd36fbec805ae211611d4c8c4a4..2f94c25cf7c7d8eab011cdd46a6691954b77a933 100644 (file)
        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']))
                {