Fixed #2148 -- Now escaping ForeignKey fields correctly in Django admin change-list pages. Thanks, rushman@mail.ru

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-06-13 23:18:15 +00:00
parent efcb5912e4
commit 93974e00d3
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ def items_for_result(cl, result):
if isinstance(f.rel, models.ManyToOneRel): if isinstance(f.rel, models.ManyToOneRel):
if field_val is not None: if field_val is not None:
result_repr = getattr(result, f.name) result_repr = escape(getattr(result, f.name))
else: else:
result_repr = EMPTY_CHANGELIST_VALUE result_repr = EMPTY_CHANGELIST_VALUE
# Dates and times are special: They're formatted in a certain way. # Dates and times are special: They're formatted in a certain way.