mirror of
https://github.com/django/django.git
synced 2025-09-22 02:02:46 +00:00
MERGED MAGIC-REMOVAL BRANCH TO TRUNK. This change is highly backwards-incompatible. Please read http://code.djangoproject.com/wiki/RemovingTheMagic for upgrade instructions.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2809 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
d5dbeaa9be
commit
f69cf70ed8
366 changed files with 17833 additions and 11199 deletions
|
@ -1,6 +1,6 @@
|
|||
import re
|
||||
|
||||
from django.conf.settings import DEFAULT_CHARSET
|
||||
from django.conf import settings
|
||||
|
||||
# Capitalizes the first letter of a string.
|
||||
capfirst = lambda x: x and x[0].upper() + x[1:]
|
||||
|
@ -100,7 +100,7 @@ def javascript_quote(s):
|
|||
return r"\u%04x" % ord(match.group(1))
|
||||
|
||||
if type(s) == str:
|
||||
s = s.decode(DEFAULT_CHARSET)
|
||||
s = s.decode(settings.DEFAULT_CHARSET)
|
||||
elif type(s) != unicode:
|
||||
raise TypeError, s
|
||||
s = s.replace('\\', '\\\\')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue