diff --git a/django/utils/html.py b/django/utils/html.py index d06440b52e..607362817b 100644 --- a/django/utils/html.py +++ b/django/utils/html.py @@ -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('&', '&').replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''') def linebreaks(value):