mirror of
https://github.com/django/django.git
synced 2025-07-04 01:39:20 +00:00
unicode: Removed some redundant code.
git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5321 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b25f6e9526
commit
9c44751c08
@ -25,8 +25,6 @@ del x # Temporary variable
|
||||
|
||||
def escape(html):
|
||||
"Returns the given HTML with ampersands, quotes and carets encoded"
|
||||
if not isinstance(html, basestring):
|
||||
html = force_unicode(html)
|
||||
return force_unicode(html).replace('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''')
|
||||
escape = allow_lazy(escape, unicode)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user