kopia lustrzana https://github.com/wagtail/wagtail
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
rodzic
eaaf450c14
commit
c7005b944f
|
@ -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 %}
|
||||||
|
|
|
@ -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 %}
|
||||||
|
|
Ładowanie…
Reference in New Issue