summaryrefslogtreecommitdiff
path: root/django/utils/html.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2022-02-21 09:46:39 +0100
committerGitHub <noreply@github.com>2022-02-21 09:46:39 +0100
commitb626c5a9798b045b655d085d59efdd60b5d7a0e3 (patch)
tree72d4ecf3fc0422e86c6326e00a626ca6e35d0a41 /django/utils/html.py
parent1299bc33e131a3c44b544b58c706bc998c4228ed (diff)
Removed unnecessary str type from @keep_lazy decorator for escape()/escapejs().
Diffstat (limited to 'django/utils/html.py')
-rw-r--r--django/utils/html.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/html.py b/django/utils/html.py
index b6d6a01ce4..d0bc97be80 100644
--- a/django/utils/html.py
+++ b/django/utils/html.py
@@ -14,7 +14,7 @@ from django.utils.safestring import SafeData, SafeString, mark_safe
from django.utils.text import normalize_newlines
-@keep_lazy(str, SafeString)
+@keep_lazy(SafeString)
def escape(text):
"""
Return the given text with ampersands, quotes and angle brackets encoded
@@ -46,7 +46,7 @@ _js_escapes = {
_js_escapes.update((ord("%c" % z), "\\u%04X" % z) for z in range(32))
-@keep_lazy(str, SafeString)
+@keep_lazy(SafeString)
def escapejs(value):
"""Hex encode characters for use in JavaScript strings."""
return mark_safe(str(value).translate(_js_escapes))