Code

Ticket #5977: missing_admin_safestr.diff

File missing_admin_safestr.diff, 739 bytes (added by SmileyChris, 7 years ago)
Line 
1Index: django/contrib/admin/templatetags/admin_list.py
2===================================================================
3--- django/contrib/admin/templatetags/admin_list.py     (revision 6674)
4+++ django/contrib/admin/templatetags/admin_list.py     (working copy)
5@@ -185,7 +185,7 @@
6             else:
7                 result_repr = escape(field_val)
8         if force_unicode(result_repr) == '':
9-            result_repr = ' '
10+            result_repr = mark_safe(' ')
11         # If list_display_links not defined, add the link tag to the first field
12         if (first and not cl.lookup_opts.admin.list_display_links) or field_name in cl.lookup_opts.admin.list_display_links:
13             table_tag = {True:'th', False:'td'}[first]