Remove redundant `|safe` filter

All button classes defined in wagtail.admin.widgets.button use either format_html or render_to_string, which mark their results as safe. And if you pass some other object as part of the buttons list that isn't as well-behaved, it's probably about time you fixed that...
pull/10939/head
Matt Westcott 2023-09-15 16:08:19 +01:00 zatwierdzone przez Matt Westcott
rodzic eaaf450c14
commit c7005b944f
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
{% for button in buttons %} {% for button in buttons %}
{% if button.show %} {% if button.show %}
<li>{{ button|safe }}</li> <li>{{ button }}</li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}

Wyświetl plik

@ -1,5 +1,5 @@
{% for button in buttons %} {% for button in buttons %}
{% if button.show %} {% if button.show %}
<li>{{ button|safe }}</li> <li>{{ button }}</li>
{% endif %} {% endif %}
{% endfor %} {% endfor %}