1
0
mirror of https://github.com/django/django.git synced 2024-12-22 17:16:24 +00:00

Refs #30686 -- Made django.utils.html.VOID_ELEMENTS a frozenset.

This commit is contained in:
Nick Pope 2024-03-14 04:56:22 +00:00 committed by GitHub
parent f5c340684b
commit 95ae37839c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -16,25 +16,27 @@ from django.utils.safestring import SafeData, SafeString, mark_safe
from django.utils.text import normalize_newlines
# https://html.spec.whatwg.org/#void-elements
VOID_ELEMENTS = {
"area",
"base",
"br",
"col",
"embed",
"hr",
"img",
"input",
"link",
"meta",
"param",
"source",
"track",
"wbr",
# Deprecated tags.
"frame",
"spacer",
}
VOID_ELEMENTS = frozenset(
(
"area",
"base",
"br",
"col",
"embed",
"hr",
"img",
"input",
"link",
"meta",
"param",
"source",
"track",
"wbr",
# Deprecated tags.
"frame",
"spacer",
)
)
@keep_lazy(SafeString)