Opened 5 years ago

Closed 5 years ago

#31175 closed Cleanup/optimization (wontfix)

Remove newline in Textarea widget. — at Version 2

Reported by: python2and3developer Owned by: nobody
Component: Forms Version: dev
Severity: Normal Keywords: template, forms, textarea
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mariusz Felisiak)

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>

Change History (2)

comment:1 by python2and3developer, 5 years ago

Type: UncategorizedBug

comment:2 by Mariusz Felisiak, 5 years ago

Description: modified (diff)
Resolution: wontfix
Status: newclosed
Summary: Extra spaces in textarea widget templateRemove newline in Textarea widget.
Type: BugCleanup/optimization
Version: 3.0master

This newline is required to fix #8627.

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