diff --git a/django/views/debug.py b/django/views/debug.py index a396d36244..df62dbfbf1 100644 --- a/django/views/debug.py +++ b/django/views/debug.py @@ -412,7 +412,7 @@ TECHNICAL_500_TEMPLATE = """

{{ exception_type }} at {{ request.path_info|escape }}

-
{{ exception_value|escape }}
+
{{ exception_value|force_escape }}
@@ -432,7 +432,7 @@ TECHNICAL_500_TEMPLATE = """ - + @@ -459,7 +459,7 @@ TECHNICAL_500_TEMPLATE = """ {% if unicode_hint %}

Unicode error hint

-

The string that could not be encoded/decoded was: {{ unicode_hint|escape }}

+

The string that could not be encoded/decoded was: {{ unicode_hint|force_escape }}

{% endif %} {% if template_does_not_exist %} @@ -532,8 +532,8 @@ TECHNICAL_500_TEMPLATE = """ {% for var in frame.vars|dictsort:"0" %} - - + + {% endfor %} @@ -582,7 +582,7 @@ Traceback: {% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %} {% endfor %} Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }} -Exception Value: {{ exception_value|escape }} +Exception Value: {{ exception_value|force_escape }}

Request Method:
Exception Value:
{{ exception_value|escape }}
{{ exception_value|force_escape }}
Exception Location:
{{ var.0|escape }}
{{ var.1|pprint|escape }}
{{ var.0|force_escape }}
{{ var.1|pprint|force_escape }}