Skip to content

Commit

Permalink
Refs #30686 -- Made django.utils.html.VOID_ELEMENTS a frozenset.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope authored Mar 14, 2024
1 parent f5c3406 commit 95ae378
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions django/utils/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@
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)
Expand Down

0 comments on commit 95ae378

Please sign in to comment.