Skip to content

Commit a56a226

Browse files
committed
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
1 parent b2d2cb4 commit a56a226

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

django/views/debug.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ def empty_urlconf(request):
412412
<body>
413413
<div id="summary">
414414
<h1>{{ exception_type }} at {{ request.path_info|escape }}</h1>
415-
<pre class="exception_value">{{ exception_value|escape }}</pre>
415+
<pre class="exception_value">{{ exception_value|force_escape }}</pre>
416416
<table class="meta">
417417
<tr>
418418
<th>Request Method:</th>
@@ -432,7 +432,7 @@ def empty_urlconf(request):
432432
</tr>
433433
<tr>
434434
<th>Exception Value:</th>
435-
<td><pre>{{ exception_value|escape }}</pre></td>
435+
<td><pre>{{ exception_value|force_escape }}</pre></td>
436436
</tr>
437437
<tr>
438438
<th>Exception Location:</th>
@@ -459,7 +459,7 @@ def empty_urlconf(request):
459459
{% if unicode_hint %}
460460
<div id="unicode-hint">
461461
<h2>Unicode error hint</h2>
462-
<p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint|escape }}</strong></p>
462+
<p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint|force_escape }}</strong></p>
463463
</div>
464464
{% endif %}
465465
{% if template_does_not_exist %}
@@ -532,8 +532,8 @@ def empty_urlconf(request):
532532
<tbody>
533533
{% for var in frame.vars|dictsort:"0" %}
534534
<tr>
535-
<td>{{ var.0|escape }}</td>
536-
<td class="code"><div>{{ var.1|pprint|escape }}</div></td>
535+
<td>{{ var.0|force_escape }}</td>
536+
<td class="code"><div>{{ var.1|pprint|force_escape }}</div></td>
537537
</tr>
538538
{% endfor %}
539539
</tbody>
@@ -582,7 +582,7 @@ def empty_urlconf(request):
582582
{% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %}
583583
{% endfor %}
584584
Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }}
585-
Exception Value: {{ exception_value|escape }}
585+
Exception Value: {{ exception_value|force_escape }}
586586
</textarea>
587587
<br><br>
588588
<input type="submit" value="Share this traceback on a public Web site">

0 commit comments

Comments
 (0)