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:
Georg Bauer 2006-01-13 20:57:30 +00:00
parent 19abf041bf
commit e4e2877b24
1 changed files with 1 additions and 1 deletions

View File

@ -100,7 +100,7 @@ def javascript_quote(s):
return r"\u%04x" % ord(match.group(1)) return r"\u%04x" % ord(match.group(1))
if type(s) == str: if type(s) == str:
s = s.decode(DEFAULT_ENCODING) s = s.decode(DEFAULT_CHARSET)
elif type(s) != unicode: elif type(s) != unicode:
raise TypeError, s raise TypeError, s
s = s.replace('\\', '\\\\') s = s.replace('\\', '\\\\')