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 20:01:41 -0400 |
| commit | 44a05a8a912596c44f37f050dcde85b45827b3b6 (patch) | |
| tree | 237d32eff118beb88ebbb0c29eaff456978bdbfa /django/forms/utils.py | |
| parent | 6a2f46f2381269187195a0f9165a893f54dc01a3 (diff) | |
[1.8.x] Fixed #24469 -- Refined escaping of Django's form elements in non-Django templates.
Backport of 1f2abf784a9fe550959de242d91963b2ad6f7e9c from master
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 73a18622c1..717c3d0606 100644 --- a/django/forms/utils.py +++ b/django/forms/utils.py @@ -9,7 +9,7 @@ from django.conf import settings from django.core.exceptions import ValidationError 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: @@ -42,6 +42,7 @@ def flatatt(attrs): ) +@html_safe @python_2_unicode_compatible class ErrorDict(dict): """ @@ -74,6 +75,7 @@ class ErrorDict(dict): return self.as_ul() +@html_safe @python_2_unicode_compatible class ErrorList(UserList, list): """ |
