Opened 15 years ago
Last modified 12 years ago
#13385 closed
Wrong behavior for textarea tag render — at Initial Version
Reported by: | William Grzybowski | Owned by: | nobody |
---|---|---|---|
Component: | Forms | Version: | 1.1 |
Severity: | Normal | Keywords: | textarea form |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The Textarea widget is rendering textarea tag like this:
return mark_safe(u'<textarea%s>%s</textarea>' % (flatatt(final_attrs),
conditional_escape(force_unicode(value))))
However this is not the expected behavior for textarea tag, as from W3C[1] this should be:
<textarea>
first line
</textarea>
So the correct render should be:
return mark_safe(u'<textarea%s>\n%s\n</textarea>' % (flatatt(final_attrs),
conditional_escape(force_unicode(value))))
[1] http://www.w3.org/TR/html401/interact/forms.html#edef-TEXTAREA