diff options
author | Moritz Sichert <moritz.sichert@googlemail.com> | 2015-03-18 21:42:59 +0100 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-03-27 19:46:20 -0400 |
commit | 1f2abf784a9fe550959de242d91963b2ad6f7e9c (patch) | |
tree | bf56ca4f56279281a24793197fc6bed88781f727 /django/forms/utils.py | |
parent | dc5b01ad05e50ccde688c73c2ed3334a956076b0 (diff) | |
download | django-1f2abf784a9fe550959de242d91963b2ad6f7e9c.tar.gz |
Fixed #24469 -- Refined escaping of Django's form elements in non-Django templates.
Diffstat (limited to 'django/forms/utils.py')
-rw-r--r-- | django/forms/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/django/forms/utils.py b/django/forms/utils.py index ab0c80769b..9d41ba3639 100644 --- a/django/forms/utils.py +++ b/django/forms/utils.py @@ -7,7 +7,7 @@ from django.conf import settings from django.core.exceptions import ValidationError # backwards compatibility from django.utils import six, timezone from django.utils.encoding import force_text, python_2_unicode_compatible -from django.utils.html import escape, format_html, format_html_join +from django.utils.html import escape, format_html, format_html_join, html_safe from django.utils.translation import ugettext_lazy as _ try: @@ -40,6 +40,7 @@ def flatatt(attrs): ) +@html_safe @python_2_unicode_compatible class ErrorDict(dict): """ @@ -72,6 +73,7 @@ class ErrorDict(dict): return self.as_ul() +@html_safe @python_2_unicode_compatible class ErrorList(UserList, list): """ |