diff options
| author | nabil-rady <midorady9999@gmail.com> | 2024-08-14 00:58:37 +0300 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-08-20 08:20:34 +0200 |
| commit | 231c0d85931b5afde3e3caec0e6bc5ca6132bb7a (patch) | |
| tree | 8f7fbb7deb54c15507852eec31740f2a1a7adfbf /django/utils/html.py | |
| parent | ca1318988c68f623ab12ab4ddb04eabb8afe5a33 (diff) | |
Fixed #35668 -- Added mapping support to format_html_join.
Diffstat (limited to 'django/utils/html.py')
| -rw-r--r-- | django/utils/html.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 154c820d34..3ad920aca0 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -4,6 +4,7 @@ import html import json import re import warnings +from collections.abc import Mapping from html.parser import HTMLParser from urllib.parse import parse_qsl, quote, unquote, urlencode, urlsplit, urlunsplit @@ -155,7 +156,12 @@ def format_html_join(sep, format_string, args_generator): """ return mark_safe( conditional_escape(sep).join( - format_html(format_string, *args) for args in args_generator + ( + format_html(format_string, **args) + if isinstance(args, Mapping) + else format_html(format_string, *args) + ) + for args in args_generator ) ) |
