﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28874	Errors on hidden input fields print out double escaped HTML	Kyle Agronick	Daniil Ryzhkov	"Hidden input fields will print errors like ""It\'s the thing &"" as ""(Hidden field test) It&#39;s the thing &amp;"". with HTML that is double escaped as 


{{{
<ul class=""errorlist nonfield"">
    <li>(Hidden field test) It&amp;#39;s the thing &amp;amp;</li>
</ul>
}}}


Using this code:



views.py
{{{
class TestForm(forms.Form):
    test = forms.CharField(widget=forms.HiddenInput(), required=False)
    foo = forms.CharField()

class StoreGroupDelete(FormView):
    form_class = TestForm
    template_name = 'test/test_delete.html'

    def form_valid(self, form):
        form.add_error('test', 'It\'s the thing &')
        return self.form_invalid(form)
}}}

test.html
{{{
        <form method=""post"">
            {% csrf_token %}
            <ul>
            {{ form.as_ul }}
            </ul><input type=""submit"" />
        </form>
}}}

This only happens on hidden inputs. Regular fields work fine. This is on 1.11.7."	Bug	closed	Template system	1.11	Normal	fixed		Daniil Ryzhkov	Accepted	1	0	1	0	1	1
