mirror of https://github.com/django/django.git
fixed #1221 - changed usage of wrong settings variable DEFAULT_ENCODING to the correct DEFAULT_CHARSET.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
19abf041bf
commit
e4e2877b24
|
@ -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('\\', '\\\\')
|
||||
|
|
Loading…
Reference in New Issue