diff --git a/django/utils/text.py b/django/utils/text.py index 8206095f42..ce1225b83c 100644 --- a/django/utils/text.py +++ b/django/utils/text.py @@ -100,7 +100,7 @@ def javascript_quote(s): return r"\u%04x" % ord(match.group(1)) if type(s) == str: - s = s.decode(DEFAULT_ENCODING) + s = s.decode(DEFAULT_CHARSET) elif type(s) != unicode: raise TypeError, s s = s.replace('\\', '\\\\')