diff --git a/django/contrib/admin/templatetags/admin_list.py b/django/contrib/admin/templatetags/admin_list.py index b23013becd1..e49848f46f5 100644 --- a/django/contrib/admin/templatetags/admin_list.py +++ b/django/contrib/admin/templatetags/admin_list.py @@ -148,6 +148,8 @@ def items_for_result(cl, result): # function has an "allow_tags" attribute set to True. if not allow_tags: result_repr = escape(result_repr) + else: + result_repr = mark_safe(result_repr) else: field_val = getattr(result, f.attname)