diff options
| author | Pravin Kamble <iampbkamble@gmail.com> | 2025-12-17 21:44:48 +0530 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-12-17 12:15:18 -0500 |
| commit | 4774adfaa18391854bb5449b4bcb0e9ab5e66b73 (patch) | |
| tree | 1f6a72886a1456c5d5939c65d92149c9605a1f75 /django/utils/html.py | |
| parent | 0d8548e5831bc610102d5e4b8a2366f26818a28a (diff) | |
Fixed #32568 -- Replaced mark_safe() with SafeString for literal values.
Replaced instances of mark_safe('some string literal') with
SafeString to avoid the overhead of managing lazy objects.
Thanks Tim McCurrach for the idea and David Smith and Jacob Walls
for reviews.
Diffstat (limited to 'django/utils/html.py')
| -rw-r--r-- | django/utils/html.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/html.py b/django/utils/html.py index 68260af337..71122ac79e 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -397,7 +397,7 @@ class Urlizer: attrs=nofollow_attr, url=trimmed, ) - return mark_safe(f"{lead}{middle}{trail}") + return SafeString(f"{lead}{middle}{trail}") else: if safe_input: return mark_safe(word) |
