From e598e2ceed58f03942f12203611ccc2e20fec66d Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sun, 1 Jul 2012 17:24:27 +0200 Subject: [PATCH] use json_encode in search stuff as well remove JSON_UNESCAPED_UNICODE, supported only by php >=5.3.3 and clients should be able to handle the escaping --- lib/lib.php | 2 +- lib/template/search-html.php | 2 +- lib/template/search-xml.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lib.php b/lib/lib.php index cc8a90e0..5d02ef89 100644 --- a/lib/lib.php +++ b/lib/lib.php @@ -597,7 +597,7 @@ { 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"); diff --git a/lib/template/search-html.php b/lib/template/search-html.php index 8b79e40c..89e4800b 100644 --- a/lib/template/search-html.php +++ b/lib/template/search-html.php @@ -358,7 +358,7 @@ target="_blank">FAQ 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'])) diff --git a/lib/template/search-xml.php b/lib/template/search-xml.php index 0521de0e..f8e054e3 100644 --- a/lib/template/search-xml.php +++ b/lib/template/search-xml.php @@ -45,7 +45,7 @@ if ($bShowPolygons && isset($aResult['aPolyPoints'])) { echo ' polygonpoints=\''; - echo javascript_renderData($aResult['aPolyPoints']); + echo json_encode($aResult['aPolyPoints']); echo '\''; } } -- 2.39.5