diff options
-rw-r--r-- | fietsboek/templates/layout.jinja2 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fietsboek/templates/layout.jinja2 b/fietsboek/templates/layout.jinja2 index 984a790..0e43a36 100644 --- a/fietsboek/templates/layout.jinja2 +++ b/fietsboek/templates/layout.jinja2 @@ -19,15 +19,15 @@ <link href="{{request.static_url('fietsboek:static/theme.css')}}" rel="stylesheet"> <script> -const FRIENDS_URL = "{{ request.route_url('json-friends') }}"; -const LOCALE = "{{ request.localizer.locale_name.replace('_', '-') }}"; +const FRIENDS_URL = {{ request.route_url('json-friends') | tojson }}; +const LOCALE = {{ request.localizer.locale_name.replace('_', '-') | tojson }}; {% if request.registry.settings.get("thunderforest.api_key") %} {% set api_key = request.registry.settings.get("thunderforest.api_key") %} window.JB = window.JB || {}; window.JB.GPX2GM = window.JB.GPX2GM || {}; -window.JB.GPX2GM.OSM_Cycle_Api_Key = "{{ api_key }}"; -window.JB.GPX2GM.OSM_Landscape_Api_Key = "{{ api_key }}"; -window.JB.GPX2GM.OSM_Outdoors_Api_Key = "{{ api_key }}"; +window.JB.GPX2GM.OSM_Cycle_Api_Key = {{ api_key | tojson }}; +window.JB.GPX2GM.OSM_Landscape_Api_Key = {{ api_key | tojson}}; +window.JB.GPX2GM.OSM_Outdoors_Api_Key = {{ api_key | tojson }}; {% endif %} </script> |