diff options
| author | Daniil <daniilr@users.noreply.github.com> | 2017-12-11 22:30:47 +1000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-12-11 07:30:47 -0500 |
| commit | 7c7bc6391a3e83566f9ace59955e63503bc76cee (patch) | |
| tree | 91ea930d8288f33c2ce977d58de3368229066875 /django/forms/forms.py | |
| parent | d13a9e44ded4e93570c6ba42ec84e45ddca2505b (diff) | |
Fixed #28874 -- Prevented double escaping of errors on hidden form fields.
Diffstat (limited to 'django/forms/forms.py')
| -rw-r--r-- | django/forms/forms.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/django/forms/forms.py b/django/forms/forms.py index a43f80996b..d8a05e3583 100644 --- a/django/forms/forms.py +++ b/django/forms/forms.py @@ -199,8 +199,7 @@ class BaseForm: for name, field in self.fields.items(): html_class_attr = '' bf = self[name] - # Escape and cache in local variable. - bf_errors = self.error_class([conditional_escape(error) for error in bf.errors]) + bf_errors = self.error_class(bf.errors) if bf.is_hidden: if bf_errors: top_errors.extend( |
