From a56a226241f5808b2eaf1e4b5a155d35047b8a06 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Sat, 11 Sep 2010 02:02:20 +0000 Subject: [PATCH] Display a repr-like result for safe-string local variables on the debug page. Fixed #7697. Thanks, SmileyChris. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13741 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/views/debug.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/django/views/debug.py b/django/views/debug.py index a396d362448..df62dbfbf13 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 }}