summaryrefslogtreecommitdiff
path: root/django/template/debug.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/template/debug.py')
-rw-r--r--django/template/debug.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/template/debug.py b/django/template/debug.py
index cf9c2a59fc..465d7ff926 100644
--- a/django/template/debug.py
+++ b/django/template/debug.py
@@ -1,6 +1,6 @@
from django.template.base import Lexer, Parser, tag_re, NodeList, VariableNode, TemplateSyntaxError
from django.utils.encoding import force_text
-from django.utils.html import escape
+from django.utils.html import conditional_escape
from django.utils.safestring import SafeData, EscapeData
from django.utils.formats import localize
from django.utils.timezone import template_localtime
@@ -98,6 +98,6 @@ class DebugVariableNode(VariableNode):
e.django_template_source = self.source
raise
if (context.autoescape and not isinstance(output, SafeData)) or isinstance(output, EscapeData):
- return escape(output)
+ return conditional_escape(output)
else:
return output