Author: mtredinnick
Date: 2010-09-10 21:02:20 -0500 (Fri, 10 Sep 2010)
New Revision: 13741
Modified:
django/trunk/django/views/debug.py
Log:
Display a repr-like result for safe-string local variables on the debug page.
Fixed #7697. Thanks, SmileyChris.
Modified: django/trunk/django/views/debug.py
===================================================================
--- django/trunk/django/views/debug.py 2010-09-11 01:41:53 UTC (rev 13740)
+++ django/trunk/django/views/debug.py 2010-09-11 02:02:20 UTC (rev 13741)
@@ -412,7 +412,7 @@
<body>
<div id="summary">
<h1>{{ exception_type }} at {{ request.path_info|escape }}</h1>
- <pre class="exception_value">{{ exception_value|escape }}</pre>
+ <pre class="exception_value">{{ exception_value|force_escape }}</pre>
<table class="meta">
<tr>
<th>Request Method:</th>
@@ -432,7 +432,7 @@
</tr>
<tr>
<th>Exception Value:</th>
- <td><pre>{{ exception_value|escape }}</pre></td>
+ <td><pre>{{ exception_value|force_escape }}</pre></td>
</tr>
<tr>
<th>Exception Location:</th>
@@ -459,7 +459,7 @@
{% if unicode_hint %}
<div id="unicode-hint">
<h2>Unicode error hint</h2>
- <p>The string that could not be encoded/decoded was: <strong>{{
unicode_hint|escape }}</strong></p>
+ <p>The string that could not be encoded/decoded was: <strong>{{
unicode_hint|force_escape }}</strong></p>
</div>
{% endif %}
{% if template_does_not_exist %}
@@ -532,8 +532,8 @@
<tbody>
{% for var in frame.vars|dictsort:"0" %}
<tr>
- <td>{{ var.0|escape }}</td>
- <td class="code"><div>{{ var.1|pprint|escape }}</div></td>
+ <td>{{ var.0|force_escape }}</td>
+ <td class="code"><div>{{ var.1|pprint|force_escape
}}</div></td>
</tr>
{% endfor %}
</tbody>
@@ -582,7 +582,7 @@
{% 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 }}
</textarea>
<br><br>
<input type="submit" value="Share this traceback on a public Web site">
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.