[Django] #31175: Extra spaces in textarea widget template

88 views
Skip to first unread message

Django

unread,
Jan 17, 2020, 6:47:47 AM1/17/20
to django-...@googlegroups.com
#31175: Extra spaces in textarea widget template
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
python2and3developer |
Type: | Status: new
Uncategorized |
Component: Forms | Version: 3.0
Severity: Normal | Keywords: template, forms,
Triage Stage: | textarea
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
The template of textarea widget has some extra spaces that are added
directily inside the textarea when its rendering on the browser.
https://github.com/django/django/blob/master/django/forms/templates/django/forms/widgets/textarea.html

{{{
<textarea name="{{ widget.name }}"{% include
"django/forms/widgets/attrs.html" %}>
{% if widget.value %}{{ widget.value }}{% endif %}</textarea>
}}}

The porposal is to change that to this (only one line, instead of two):
{{{
<textarea name="{{ widget.name }}"{% include
"django/forms/widgets/attrs.html" %}>{% if widget.value %}{{ widget.value
}}{% endif %}</textarea>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31175>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 17, 2020, 6:48:08 AM1/17/20
to django-...@googlegroups.com
#31175: Extra spaces in textarea widget template
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
python2and3developer |
Type: Bug | Status: new
Component: Forms | Version: 3.0
Severity: Normal | Resolution:

Keywords: template, forms, | Triage Stage:
textarea | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by python2and3developer):

* type: Uncategorized => Bug


--
Ticket URL: <https://code.djangoproject.com/ticket/31175#comment:1>

Django

unread,
Jan 17, 2020, 7:05:54 AM1/17/20
to django-...@googlegroups.com
#31175: Remove newline in Textarea widget.

-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
python2and3developer |
Type: | Status: closed
Cleanup/optimization |
Component: Forms | Version: master
Severity: Normal | Resolution: wontfix

Keywords: template, forms, | Triage Stage:
textarea | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: new => closed
* resolution: => wontfix
* version: 3.0 => master
* type: Bug => Cleanup/optimization


Old description:

> The template of textarea widget has some extra spaces that are added
> directily inside the textarea when its rendering on the browser.
> https://github.com/django/django/blob/master/django/forms/templates/django/forms/widgets/textarea.html
>
> {{{
> <textarea name="{{ widget.name }}"{% include
> "django/forms/widgets/attrs.html" %}>
> {% if widget.value %}{{ widget.value }}{% endif %}</textarea>
> }}}
>
> The porposal is to change that to this (only one line, instead of two):
> {{{
> <textarea name="{{ widget.name }}"{% include
> "django/forms/widgets/attrs.html" %}>{% if widget.value %}{{ widget.value
> }}{% endif %}</textarea>
> }}}

New description:

The template of textarea widget has some extra spaces that are added

directly inside the textarea when its rendering on the browser.
https://github.com/django/django/blob/master/django/forms/templates/django/forms/widgets/textarea.html

{{{
<textarea name="{{ widget.name }}"{% include
"django/forms/widgets/attrs.html" %}>
{% if widget.value %}{{ widget.value }}{% endif %}</textarea>
}}}

The proposal is to change that to this (only one line, instead of two):


{{{
<textarea name="{{ widget.name }}"{% include
"django/forms/widgets/attrs.html" %}>{% if widget.value %}{{ widget.value
}}{% endif %}</textarea>
}}}

--

Comment:

This newline is required to fix #8627.

--
Ticket URL: <https://code.djangoproject.com/ticket/31175#comment:2>

Reply all
Reply to author
Forward
0 new messages