Backed out a portion of [4919] until I can make it worth smoothly with

oldforms. Refs #3924.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@4933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2007-04-05 14:52:33 +00:00
parent e57d1bddda
commit 73c40c5999
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ del x # Temporary variable
def escape(html):
"Returns the given HTML with ampersands, quotes and carets encoded"
if not isinstance(html, basestring):
html = smart_unicode(html)
html = str(html)
return html.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('"', '&quot;').replace("'", '&#39;')
def linebreaks(value):