Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Display a repr-like result for safe-string local variables on the deb…

…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...
commit a56a226241f5808b2eaf1e4b5a155d35047b8a06 1 parent b2d2cb4
Malcolm Tredinnick authored September 11, 2010

Showing 1 changed file with 6 additions and 6 deletions. Show diff stats Hide diff stats

  1. 12  django/views/debug.py
12  django/views/debug.py
@@ -412,7 +412,7 @@ def empty_urlconf(request):
412 412
 <body>
413 413
 <div id="summary">
414 414
   <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>
416 416
   <table class="meta">
417 417
     <tr>
418 418
       <th>Request Method:</th>
@@ -432,7 +432,7 @@ def empty_urlconf(request):
432 432
     </tr>
433 433
     <tr>
434 434
       <th>Exception Value:</th>
435  
-      <td><pre>{{ exception_value|escape }}</pre></td>
  435
+      <td><pre>{{ exception_value|force_escape }}</pre></td>
436 436
     </tr>
437 437
     <tr>
438 438
       <th>Exception Location:</th>
@@ -459,7 +459,7 @@ def empty_urlconf(request):
459 459
 {% if unicode_hint %}
460 460
 <div id="unicode-hint">
461 461
     <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>
463 463
 </div>
464 464
 {% endif %}
465 465
 {% if template_does_not_exist %}
@@ -532,8 +532,8 @@ def empty_urlconf(request):
532 532
               <tbody>
533 533
                 {% for var in frame.vars|dictsort:"0" %}
534 534
                   <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>
537 537
                   </tr>
538 538
                 {% endfor %}
539 539
               </tbody>
@@ -582,7 +582,7 @@ def empty_urlconf(request):
582 582
 {% if frame.context_line %}  {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %}
583 583
 {% endfor %}
584 584
 Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }}
585  
-Exception Value: {{ exception_value|escape }}
  585
+Exception Value: {{ exception_value|force_escape }}
586 586
 </textarea>
587 587
   <br><br>
588 588
   <input type="submit" value="Share this traceback on a public Web site">

0 notes on commit a56a226

Please sign in to comment.
Something went wrong with that request. Please try again.