From 6fb64e6a46b7660a42bff5ae5d6e57f035b559cb Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Wed, 25 Aug 2021 07:22:53 -0400 Subject: [PATCH] fix JSON filter in HTML items/item templates (#761) (#763) --- pygeoapi/templates/collections/items/index.html | 2 +- pygeoapi/templates/collections/items/item.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pygeoapi/templates/collections/items/index.html b/pygeoapi/templates/collections/items/index.html index 7fade3d..5fb3184 100644 --- a/pygeoapi/templates/collections/items/index.html +++ b/pygeoapi/templates/collections/items/index.html @@ -127,7 +127,7 @@ attribution: '{{ config['server']['map']['attribution'] }}' } )); - var geojson_data = {{ data['features'] | to_json }}; + var geojson_data = {{ data['features'] | to_json | safe }}; var items = new L.GeoJSON(geojson_data, { onEachFeature: function (feature, layer) { var url = '{{ data['items_path'] }}/' + feature.id + '?f=html'; diff --git a/pygeoapi/templates/collections/items/item.html b/pygeoapi/templates/collections/items/item.html index df0aec3..244f60a 100644 --- a/pygeoapi/templates/collections/items/item.html +++ b/pygeoapi/templates/collections/items/item.html @@ -127,7 +127,7 @@ attribution: '{{ config['server']['map']['attribution'] }}' } )); - var geojson_data = {{ data |to_json }}; + var geojson_data = {{ data | to_json | safe }}; var items = new L.GeoJSON(geojson_data); map.addLayer(items);