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.
Comment (by Jon Dufresne):
[https://github.com/django/django/pull/9602 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:1>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:2>
* component: Uncategorized => Forms
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/29038#comment:3>
* 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>
* 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>
* 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>