]> git.openstreetmap.org Git - nominatim.git/commitdiff
use json_encode in search stuff as well
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 1 Jul 2012 15:24:27 +0000 (17:24 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 1 Jul 2012 15:24:27 +0000 (17:24 +0200)
remove JSON_UNESCAPED_UNICODE, supported only by php >=5.3.3 and
clients should be able to handle the escaping

lib/lib.php
lib/template/search-html.php
lib/template/search-xml.php

index cc8a90e0ae134350ec3039addb4adab1b379a0d7..5d02ef89a1c530a7f3e0b0fa53accdde394963af 100644 (file)
     {
         header("Access-Control-Allow-Origin: *");
 
-        $jsonout = json_encode($xVal, JSON_UNESCAPED_UNICODE);
+        $jsonout = json_encode($xVal);
 
                if( ! isset($_GET['json_callback'])) {
                        header("Content-Type: application/json; charset=UTF-8");
index 8b79e40c413c3351aa511718e87b4c38e50f89ee..89e4800be35fa76fbaf4a4964a7a40ccbadffcf0 100644 (file)
@@ -358,7 +358,7 @@ target="_blank">FAQ</a></td>
                        echo ', '.$aResult['aBoundingBox'][1];
                        echo ', '.$aResult['aBoundingBox'][2];
                        echo ', '.$aResult['aBoundingBox'][3];
-                       if (isset($aResult['aPolyPoints'])) echo ', '.javascript_renderData($aResult['aPolyPoints']);
+                       if (isset($aResult['aPolyPoints'])) echo ', '.json_encode($aResult['aPolyPoints']);
                        echo ');\'>';
                }
                elseif (isset($aResult['zoom']))
index 0521de0ec960c1f1a9b53d18e8d6b6d31672dc9e..f8e054e3a1dd673697a35027311c02159f4b8053 100644 (file)
@@ -45,7 +45,7 @@
                        if ($bShowPolygons && isset($aResult['aPolyPoints']))
                        {
                                echo ' polygonpoints=\'';
-                               echo javascript_renderData($aResult['aPolyPoints']);
+                               echo json_encode($aResult['aPolyPoints']);
                                echo '\'';
                        }
                }