mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
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
This commit is contained in:
@@ -597,7 +597,7 @@
|
|||||||
{
|
{
|
||||||
header("Access-Control-Allow-Origin: *");
|
header("Access-Control-Allow-Origin: *");
|
||||||
|
|
||||||
$jsonout = json_encode($xVal, JSON_UNESCAPED_UNICODE);
|
$jsonout = json_encode($xVal);
|
||||||
|
|
||||||
if( ! isset($_GET['json_callback'])) {
|
if( ! isset($_GET['json_callback'])) {
|
||||||
header("Content-Type: application/json; charset=UTF-8");
|
header("Content-Type: application/json; charset=UTF-8");
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ target="_blank">FAQ</a></td>
|
|||||||
echo ', '.$aResult['aBoundingBox'][1];
|
echo ', '.$aResult['aBoundingBox'][1];
|
||||||
echo ', '.$aResult['aBoundingBox'][2];
|
echo ', '.$aResult['aBoundingBox'][2];
|
||||||
echo ', '.$aResult['aBoundingBox'][3];
|
echo ', '.$aResult['aBoundingBox'][3];
|
||||||
if (isset($aResult['aPolyPoints'])) echo ', '.javascript_renderData($aResult['aPolyPoints']);
|
if (isset($aResult['aPolyPoints'])) echo ', '.json_encode($aResult['aPolyPoints']);
|
||||||
echo ');\'>';
|
echo ');\'>';
|
||||||
}
|
}
|
||||||
elseif (isset($aResult['zoom']))
|
elseif (isset($aResult['zoom']))
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
if ($bShowPolygons && isset($aResult['aPolyPoints']))
|
if ($bShowPolygons && isset($aResult['aPolyPoints']))
|
||||||
{
|
{
|
||||||
echo ' polygonpoints=\'';
|
echo ' polygonpoints=\'';
|
||||||
echo javascript_renderData($aResult['aPolyPoints']);
|
echo json_encode($aResult['aPolyPoints']);
|
||||||
echo '\'';
|
echo '\'';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user