1
0
mirror of https://github.com/django/django.git synced 2025-06-05 03:29:12 +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 from django.utils.text import normalize_newlines
# https://html.spec.whatwg.org/#void-elements # https://html.spec.whatwg.org/#void-elements
VOID_ELEMENTS = { VOID_ELEMENTS = frozenset(
"area", (
"base", "area",
"br", "base",
"col", "br",
"embed", "col",
"hr", "embed",
"img", "hr",
"input", "img",
"link", "input",
"meta", "link",
"param", "meta",
"source", "param",
"track", "source",
"wbr", "track",
# Deprecated tags. "wbr",
"frame", # Deprecated tags.
"spacer", "frame",
} "spacer",
)
)
@keep_lazy(SafeString) @keep_lazy(SafeString)