mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
fix: do not autoescape static tag (#2376)
When using django-storage S3, this will escape the final static URL, containing query string (so & will become &).
This commit is contained in:
commit
8f3e9ee546
7 changed files with 17 additions and 0 deletions
|
@ -46,6 +46,7 @@ STORAGES = {
|
|||
"secret_key": "yyy",
|
||||
"bucket_name": "umap-pictograms",
|
||||
"endpoint_url": "http://127.0.0.1:9000",
|
||||
"default_acl": "public-read",
|
||||
},
|
||||
},
|
||||
"data": {
|
||||
|
@ -65,6 +66,7 @@ STORAGES = {
|
|||
"secret_key": "yyy",
|
||||
"bucket_name": "umapstatics",
|
||||
"endpoint_url": "http://127.0.0.1:9000",
|
||||
"default_acl": "public-read",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
{# See https://evilmartians.com/chronicles/how-to-favicon-in-2021-six-files-that-fit-most-needs #}
|
||||
{% autoescape off %}
|
||||
<link rel="icon"
|
||||
href="{% static 'umap/favicons/favicon.ico' %}"
|
||||
sizes="32x32">
|
||||
|
@ -28,6 +29,7 @@
|
|||
href="{% static 'umap/favicons/apple-touch-icon.png' %}">
|
||||
<!-- 180×180 -->
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
{% endautoescape %}
|
||||
</head>
|
||||
<body class="{% block body_class %}{% endblock body_class %}">
|
||||
{% block header %}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
{% load i18n static %}
|
||||
|
||||
{% autoescape off %}
|
||||
<style type="text/css">
|
||||
@import "{% static 'umap/js/components/alerts/alert.css' %}";
|
||||
</style>
|
||||
{% endautoescape %}
|
||||
<template id="umap-alert-template">
|
||||
<div role="dialog" class="dark window umap-alert">
|
||||
<div>
|
||||
|
@ -97,6 +99,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<umap-alert-conflict></umap-alert-conflict>
|
||||
{% autoescape off %}
|
||||
<script type="module">
|
||||
import { register } from '{% static 'umap/js/components/base.js' %}'
|
||||
import {
|
||||
|
@ -108,3 +111,4 @@
|
|||
register(uMapAlertCreation, 'umap-alert-creation')
|
||||
register(uMapAlertConflict, 'umap-alert-conflict')
|
||||
</script>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{% load static %}
|
||||
|
||||
{% autoescape off %}
|
||||
|
||||
<link rel="stylesheet"
|
||||
href="{% static 'umap/vendors/leaflet/leaflet.css' %}" />
|
||||
<link rel="stylesheet"
|
||||
|
@ -39,3 +41,4 @@
|
|||
<link rel="stylesheet" href="{% static 'umap/css/tableeditor.css' %}" />
|
||||
<link rel="stylesheet" href="{% static 'umap/css/bar.css' %}" />
|
||||
<link rel="stylesheet" href="{% static 'umap/theme.css' %}" />
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{% load static %}
|
||||
|
||||
{% autoescape off %}
|
||||
<script type="module"
|
||||
src="{% static 'umap/vendors/leaflet/leaflet-src.esm.js' %}"
|
||||
defer></script>
|
||||
|
@ -42,3 +43,4 @@
|
|||
<script src="{% static 'umap/js/umap.forms.js' %}" defer></script>
|
||||
<script src="{% static 'umap/js/umap.controls.js' %}" defer></script>
|
||||
<script type="module" src="{% static 'umap/js/components/fragment.js' %}" defer></script>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
</div>
|
||||
<!-- djlint:off -->
|
||||
<script defer type="module">
|
||||
{% autoescape off %}
|
||||
import Umap from '{% static "umap/js/modules/umap.js" %}'
|
||||
{% endautoescape %}
|
||||
U.MAP = new Umap("map", {{ map_settings|notag|safe }})
|
||||
</script>
|
||||
<!-- djlint:on -->
|
||||
|
|
|
@ -46,7 +46,9 @@
|
|||
{% block bottom_js %}
|
||||
{{ block.super }}
|
||||
<script type="module">
|
||||
{% autoescape off %}
|
||||
import Umap from '{% static "umap/js/modules/umap.js" %}'
|
||||
{% endautoescape %}
|
||||
const CACHE = {}
|
||||
for (const mapOpener of document.querySelectorAll("button.map-opener")) {
|
||||
mapOpener.addEventListener('click', (event) => {
|
||||
|
|
Loading…
Reference in a new issue