Opened 15 years ago

Last modified 12 years ago

#13385 closed

Wrong behavior for textarea tag render — at Version 1

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 (last modified by Ramiro Morales)

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

Change History (1)

comment:1 by Ramiro Morales, 15 years ago

Description: modified (diff)

(reformatted description)

Note: See TracTickets for help on using tickets.
Back to Top