Missing override to `format_map`
xmo-odoo opened this issue · 3 comments
xmo-odoo commented
str.format_map
was added in 3.2, but it's not overridden by markupsafe, so if a user format_map
s into a Markup
expecting the same behaviour as format
or __mod__
they'll be disappointed:
>>> Markup('{a}').format(a='<>')
Markup('<>')
>>> Markup('{a}').format_map({'a': '<>'})
'<>'
davidism commented
I've noticed some other str
methods that return str
and should be wrapped as well: casefold
, removeprefix
, and removesuffix
.
davidism commented
MarkupSafe 2.1.3 is now available on PyPI.
xmo-odoo commented
👍 thank you very much