chrisspen/django-chroniker

allow_tags depreciated, need to unescape using format_url

Closed this issue · 0 comments

"Deprecated since version 1.9: In older versions, you could add an allow_tags attribute to the method to prevent auto-escaping. This attribute is deprecated as it’s safer to use format_html(), format_html_join(), or mark_safe() instead."

for example:
https://github.com/chrisspen/django-chroniker/blob/master/chroniker/admin.py#L332

would be
from django.utils.html import format_html

return format_html('<a href="{url}?job__id__exact={id}" target="_blank" class="button">View&nbsp;{count}</a>'\ .format(**kwargs))