mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Escape special HTML characters on the events page
This commit is contained in:
parent
701dfd35a2
commit
4bdca82894
3 changed files with 19 additions and 3 deletions
|
@ -23,7 +23,7 @@ L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|||
|
||||
var markers = new L.MarkerClusterGroup({showCoverageOnHover: false, maxClusterRadius: 20});
|
||||
{% filter_for p in site.pages sort_by:date category:event %}{% if p.geoloc != 'false' %}
|
||||
L.marker([{{ p.geoloc }}]).bindPopup('<b><a href="{{ p.link }}">{{ p.title }}</a></b><br>{{ p.date }}<br>{{ p.venue }}<br>{{ p.address }}<br>{{ p.city }}, {{ p.country }}').addTo(markers);
|
||||
L.marker([{{ p.geoloc }}]).bindPopup('<b><a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a></b><br>{{ p.date }}<br>{{ p.venue | htmlescape }}<br>{{ p.address | htmlescape }}<br>{{ p.city | htmlescape }}, {{ p.country | htmlescape }}').addTo(markers);
|
||||
{% endif %}{% endfilter_for %}
|
||||
map.addLayer(markers);
|
||||
</script>
|
||||
|
@ -31,7 +31,7 @@ map.addLayer(markers);
|
|||
<ul>
|
||||
{% filter_for p in site.pages sort_by:date category:event %}
|
||||
<li>
|
||||
{{ p.date | date:"%Y-%m-%d" }} - <a href="{{ p.link }}">{{ p.title }}</a> - {{ p.city }}, {{ p.country }}
|
||||
{{ p.date | date:"%Y-%m-%d" }} - <a href="{{ p.link | htmlescape }}">{{ p.title | htmlescape }}</a> - {{ p.city | htmlescape }}, {{ p.country | htmlescape }}
|
||||
</li>
|
||||
{% endfilter_for %}
|
||||
</ul>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue