Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #2148 -- Now escaping ForeignKey fields correctly in Django adm…

…in change-list pages. Thanks, rushman@mail.ru

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 93974e00d35a4bb14a4322009dfcdf6a987cca83 1 parent efcb591
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/templatetags/admin_list.py
View
2  django/contrib/admin/templatetags/admin_list.py
@@ -131,7 +131,7 @@ def items_for_result(cl, result):
if isinstance(f.rel, models.ManyToOneRel):
if field_val is not None:
- result_repr = getattr(result, f.name)
+ result_repr = escape(getattr(result, f.name))
else:
result_repr = EMPTY_CHANGELIST_VALUE
# Dates and times are special: They're formatted in a certain way.
Please sign in to comment.
Something went wrong with that request. Please try again.