﻿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
9111	form error get escaped on _html_output even if it is a SafeString instance	Michel Sabchuk	Karen Tracey	"Hi guys,

When I define a form and call it on a template like:

{{{
{{ form }}
}}}

The function as_table is called. The function calls _html_output to
render the widget, the errors and help messages. They are in django.forms.forms module.

The error is escaped with django.utils.html.escape function but I
think django.utils.html.conditional_escape should be used instead. This way,
if I pass a !SafeString instance to a forms.!ValidationError exception,
I can include html code on it.

This error isn't raised if I write a template like:

{{{
<div>{{ form.field.errors }}{{ form.field }}</div>
}}}

What about to change escape to conditional_escape in all the module? I can send a patch if you agree...

Best regards!
"		closed	Forms	1.0		fixed	form error escape safestring mark_safe	michelts@… Jesse Young	Accepted	1	0	0	0	0	0
