ITADN

`mark_safe` should accept `StrOrPromise`

#3391OpenAlexerson 创建于 2026-05-14
bug
A
Alexersoncommented
# Bug report ## What's wrong `mark_safe` should accept `StrOrPromise`. Right now, it’s typed as `str`. ## How is that should be According to the django code, `mark_safe` is allowed to take lazy strings and those are evaluated by `mark_safe` only on runtime: https://github.com/django/django/blob/main/django/utils/safestring.py ## System information - OS: - `django-stubs` version: 6.0.4
2 条评论