Skip to content

Commit

Permalink
Display a repr-like result for safe-string local variables on the deb…
Browse files Browse the repository at this point in the history
…ug page.

Fixed #7697. Thanks, SmileyChris.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13741 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
malcolmt committed Sep 11, 2010
1 parent b2d2cb4 commit a56a226
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions django/views/debug.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def empty_urlconf(request):
<body> <body>
<div id="summary"> <div id="summary">
<h1>{{ exception_type }} at {{ request.path_info|escape }}</h1> <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"> <table class="meta">
<tr> <tr>
<th>Request Method:</th> <th>Request Method:</th>
Expand All @@ -432,7 +432,7 @@ def empty_urlconf(request):
</tr> </tr>
<tr> <tr>
<th>Exception Value:</th> <th>Exception Value:</th>
<td><pre>{{ exception_value|escape }}</pre></td> <td><pre>{{ exception_value|force_escape }}</pre></td>
</tr> </tr>
<tr> <tr>
<th>Exception Location:</th> <th>Exception Location:</th>
Expand All @@ -459,7 +459,7 @@ def empty_urlconf(request):
{% if unicode_hint %} {% if unicode_hint %}
<div id="unicode-hint"> <div id="unicode-hint">
<h2>Unicode error hint</h2> <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> </div>
{% endif %} {% endif %}
{% if template_does_not_exist %} {% if template_does_not_exist %}
Expand Down Expand Up @@ -532,8 +532,8 @@ def empty_urlconf(request):
<tbody> <tbody>
{% for var in frame.vars|dictsort:"0" %} {% for var in frame.vars|dictsort:"0" %}
<tr> <tr>
<td>{{ var.0|escape }}</td> <td>{{ var.0|force_escape }}</td>
<td class="code"><div>{{ var.1|pprint|escape }}</div></td> <td class="code"><div>{{ var.1|pprint|force_escape }}</div></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
Expand Down Expand Up @@ -582,7 +582,7 @@ def empty_urlconf(request):
{% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %} {% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %}
{% endfor %} {% endfor %}
Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }} Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }}
Exception Value: {{ exception_value|escape }} Exception Value: {{ exception_value|force_escape }}
</textarea> </textarea>
<br><br> <br><br>
<input type="submit" value="Share this traceback on a public Web site"> <input type="submit" value="Share this traceback on a public Web site">
Expand Down

0 comments on commit a56a226

Please sign in to comment.