diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2024-03-14 04:56:22 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-14 05:56:22 +0100 |
| commit | 95ae37839c907d7d030f1387a003a5776593d7d7 (patch) | |
| tree | e231456287e5ebf5c166eedf6db79ee1527e6a4b /django/utils | |
| parent | f5c340684be3f27a145ec86ba55b24eb88d2780c (diff) | |
Refs #30686 -- Made django.utils.html.VOID_ELEMENTS a frozenset.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/html.py | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 06e8824f56..22d3ae42fa 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -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) |
