[Django] #29038: Render HTML void elements without a solidus

8 views
Skip to first unread message

Django

unread,
Jan 19, 2018, 12:04:44 AM1/19/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a solidus
------------------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
In HTML5 syntax, the solidus for
[https://html.spec.whatwg.org/dev/syntax.html#void-elements void elements]
is optional and has no effect.

As Django already uses HTML5 specific syntax (e.g. boolean attributes),
can take advantage of other HTML5 syntax. Therefore, can render HTML tags
without a final solidus.

The [https://html.spec.whatwg.org/dev/syntax.html#start-tags HTML5 spec
says]:

> if the element is one of the void elements, or if the element is a
foreign element, then there may be a single U+002F SOLIDUS character (/).
This character has no effect on void elements

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

Django

unread,
Jan 19, 2018, 12:09:20 AM1/19/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a solidus
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Jon Dufresne):

[https://github.com/django/django/pull/9602 PR]

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

Django

unread,
Jan 20, 2018, 10:31:39 AM1/20/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a solidus
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jon Dufresne):

* has_patch: 0 => 1


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

Django

unread,
Jan 20, 2018, 12:56:02 PM1/20/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a closing slash
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* component: Uncategorized => Forms
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:3>

Django

unread,
Jan 21, 2018, 2:09:27 AM1/21/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a closing slash
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"ff05de760cc4ef4c7f188e163c722ec3bc1f0cbf" ff05de7]:
{{{
#!CommitTicketReference repository=""
revision="ff05de760cc4ef4c7f188e163c722ec3bc1f0cbf"
Fixed #29038 -- Removed closing slash from HTML void tags.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:4>

Django

unread,
Aug 11, 2018, 12:56:50 PM8/11/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a closing slash
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Nils Fredrik Gjerull):

* status: closed => new
* resolution: fixed =>


Comment:

This broke my site when I tried to update to Django 2.1. I serve my pages
using XHTML serialization of HTML5 which is perfectly valid. That is I
server my pages using application/xhtml+xml mimetype. It is unusual, I
know, but I prefer the strict syntax checking I get with it. I know XHTML-
Strict has gone out of fashion, but HTML5 is not a replacement for XHTML.
HTML5 can be served as both [https://en.wikipedia.org/wiki/XHTML#XHTML5
application/xhtml+xml and text/html] and both are equally valid.

Browser support for xhtml is better than ever, so this is a better time
than ever to server pages using xhtml serialization. When XHTML-Strict was
viewed as the "way forward" it was effectively stopped by IE not
supporting it. This is no longer the case since IE9.

A web framework should have it's html written with
[https://en.wikipedia.org/wiki/Polyglot_markup polygot markup].

Please revert this changes. I will happily provide a pull-request to make
all html in Django into polygot markup.

--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:5>

Django

unread,
Aug 11, 2018, 10:09:29 PM8/11/18
to django-...@googlegroups.com
#29038: Render HTML void elements without a closing slash
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: Forms | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => fixed


Comment:

We will open a new ticket if the [https://groups.google.com/d/topic
/django-developers/G4Rz1_Bmh7w/discussion django-developers discussion]
yields a consensus to revisit this decision.

--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:6>

Reply all
Reply to author
Forward
0 new messages