Skip to content

Commit 338c45a

Browse files
committed
fix: mark intentional raw HTML as safe
1 parent 08ac01c commit 338c45a

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

templates/modal.html.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div id="{{ modal.id }}" class="modal">
22
<div class="modal-content">
33
<span class="close">
4-
<button onclick="document.querySelector('#{{ modal.id }} form').reset() ;document.querySelector('#{{ modal.id }}').classList.toggle('modal-active')">{{ modal['close-char'] }}</button>
4+
<button onclick="document.querySelector('#{{ modal.id }} form').reset() ;document.querySelector('#{{ modal.id }}').classList.toggle('modal-active')">{{ modal['close-char'] | safe }}</button>
55
</span>
66
<form id="{{ modal.id }}-form" data-api-method="{{ modal['api-method'] }}" data-api-endpoint="{{ modal['api-endpoint'] }}">
77
<h2>{{ modal.heading }}</h2>
@@ -41,4 +41,4 @@
4141
</div>
4242
</form>
4343
</div>
44-
</div>
44+
</div>

templates/zone.html.j2

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<link rel="stylesheet" href="{{ url_for('static', filename='css/zone.css') }}" />
55
<link rel="stylesheet" href="{{ url_for('static', filename='css/modal.css') }}" />
66
{% endblock %}
7-
{% set sort_up_icon = "&#x25b4;"%}
8-
{% set sort_down_icon = "&#x25be;"%}
7+
{% set sort_up_icon = "&#x25b4;" %}
8+
{% set sort_down_icon = "&#x25be;" %}
99
{% block content %}
1010
<div class="manager">
1111
<div class="header-row">
@@ -41,9 +41,9 @@
4141
{% if record_sort == 'name' %}
4242
<span class="sort-order">
4343
{% if record_sort_order == "asc" %}
44-
<a href="{{ url_for('zone', zone_name=zone.name, sort='name', sort_order='desc' ) }}"> {{ sort_up_icon }} </a>
44+
<a href="{{ url_for('zone', zone_name=zone.name, sort='name', sort_order='desc' ) }}"> {{ sort_up_icon | safe }} </a>
4545
{% elif record_sort_order == "desc"%}
46-
<a href="{{ url_for('zone', zone_name=zone.name, sort='name', sort_order='asc' ) }}"> {{ sort_down_icon }} </a>
46+
<a href="{{ url_for('zone', zone_name=zone.name, sort='name', sort_order='asc' ) }}"> {{ sort_down_icon | safe }} </a>
4747
{% endif %}
4848
</span>
4949
{% endif %}
@@ -53,9 +53,9 @@
5353
{% if record_sort == 'type' %}
5454
<span class="sort-order">
5555
{% if record_sort_order == "asc" %}
56-
<a href="{{ url_for('zone', zone_name=zone.name, sort='type', sort_order='desc' ) }}"> {{ sort_up_icon }} </a>
56+
<a href="{{ url_for('zone', zone_name=zone.name, sort='type', sort_order='desc' ) }}"> {{ sort_up_icon | safe }} </a>
5757
{% elif record_sort_order == "desc"%}
58-
<a href="{{ url_for('zone', zone_name=zone.name, sort='type', sort_order='asc' ) }}"> {{ sort_down_icon }} </a>
58+
<a href="{{ url_for('zone', zone_name=zone.name, sort='type', sort_order='asc' ) }}"> {{ sort_down_icon | safe }} </a>
5959
{% endif %}
6060
</span>
6161
{% endif %}
@@ -65,9 +65,9 @@
6565
{% if record_sort == 'ttl' %}
6666
<span class="sort-order">
6767
{% if record_sort_order == "asc" %}
68-
<a href="{{ url_for('zone', zone_name=zone.name, sort='ttl', sort_order='desc' ) }}"> {{ sort_up_icon }} </a>
68+
<a href="{{ url_for('zone', zone_name=zone.name, sort='ttl', sort_order='desc' ) }}"> {{ sort_up_icon | safe }} </a>
6969
{% elif record_sort_order == "desc"%}
70-
<a href="{{ url_for('zone', zone_name=zone.name, sort='ttl', sort_order='asc' ) }}"> {{ sort_down_icon }} </a>
70+
<a href="{{ url_for('zone', zone_name=zone.name, sort='ttl', sort_order='asc' ) }}"> {{ sort_down_icon | safe }} </a>
7171
{% endif %}
7272
</span>
7373
{% endif %}
@@ -80,9 +80,9 @@
8080
{% if record_sort == 'comment' %}
8181
<span class="sort-order">
8282
{% if record_sort_order == "asc" %}
83-
<a href="{{ url_for('zone', zone_name=zone.name, sort='comment', sort_order='desc' ) }}"> {{ sort_up_icon }} </a>
83+
<a href="{{ url_for('zone', zone_name=zone.name, sort='comment', sort_order='desc' ) }}"> {{ sort_up_icon | safe }} </a>
8484
{% elif record_sort_order == "desc"%}
85-
<a href="{{ url_for('zone', zone_name=zone.name, sort='comment', sort_order='asc' ) }}"> {{ sort_down_icon }} </a>
85+
<a href="{{ url_for('zone', zone_name=zone.name, sort='comment', sort_order='asc' ) }}"> {{ sort_down_icon | safe }} </a>
8686
{% endif %}
8787
</span>
8888
{% endif %}
@@ -168,4 +168,4 @@
168168
</div>
169169
<script src="{{ url_for('static', filename='js/zone.js') }}"></script>
170170
<script src="{{ url_for('static', filename='js/modal.js') }}"></script>
171-
{% endblock %}
171+
{% endblock %}

0 commit comments

Comments
 (0)