#9111: form error get escaped on _html_output even if it is a SafeString 
instance
----------------------------------------------------+-----------------------
 Reporter:  michelts                                |       Owner:  nobody    
   Status:  new                                     |   Milestone:            
Component:  Forms                                   |     Version:  1.0       
 Keywords:  form error escape safestring mark_safe  |       Stage:  Unreviewed
Has_patch:  0                                       |  
----------------------------------------------------+-----------------------
 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!

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9111>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to