#24871: Textarea widget has redundant \r\n
----------------------------------+--------------------------------------
Reporter: tompecina | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: 1.8
Severity: Normal | Resolution:
Keywords: textarea, widget | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+--------------------------------------
Comment (by tompecina):
That's right, so the information weather to add a newline would have to be
supplied by the developer somehow, eg, in a settings variable.
To sum it up, standard HTML requires a leading newline as all browsers are
required to ignore it, by the HTML standard. Stripping it would break a
lot of existing code because leading newlines cannot be safely stripped,
as is the case with CMS's, etc.
On the other hand, when Django is outputting XML-serialized code, there is
no way to get rid of the extra newline, except using a custom Textarea
widget.
I see no easy way out, the "lesser evil" appears to be a new settings
variable.
--
Ticket URL: <https://code.djangoproject.com/ticket/24871#comment:5>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.6cf924dc526b11e80285ef77dd23aca5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.