1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

newforms-admin: Fixed #6226 -- allow_tags is now correctly honored and marks the data as safe. Thanks, michelts and jgelens.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Brian Rosner 2008-03-31 21:04:54 +00:00
parent 85471641f1
commit de072d889d

View File

@ -148,6 +148,8 @@ def items_for_result(cl, result):
# function has an "allow_tags" attribute set to True. # function has an "allow_tags" attribute set to True.
if not allow_tags: if not allow_tags:
result_repr = escape(result_repr) result_repr = escape(result_repr)
else:
result_repr = mark_safe(result_repr)
else: else:
field_val = getattr(result, f.attname) field_val = getattr(result, f.attname)