]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/search-xml.php
Merge branch 'patch-1' of https://github.com/Firefishy/Nominatim
[nominatim.git] / lib / template / search-xml.php
index 6ceb53cd3be6e25ece4baa1087838f918dd7bdd6..f8e054e3a1dd673697a35027311c02159f4b8053 100644 (file)
@@ -10,7 +10,7 @@
        echo " timestamp='".date(DATE_RFC822)."'";
        echo " attribution='Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0.'";
        echo " querystring='".htmlspecialchars($sQuery, ENT_QUOTES)."'";
-       if ($sViewBox) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
+       if (isset($sViewBox)) echo " viewbox='".htmlspecialchars($sViewBox, ENT_QUOTES)."'";
        echo " polygon='".($bShowPolygons?'true':'false')."'";
        if (sizeof($aExcludePlaceIDs))
        {
@@ -45,7 +45,7 @@
                        if ($bShowPolygons && isset($aResult['aPolyPoints']))
                        {
                                echo ' polygonpoints=\'';
-                               echo javascript_renderData($aResult['aPolyPoints']);
+                               echo json_encode($aResult['aPolyPoints']);
                                echo '\'';
                        }
                }