Ticket #7697: 7697.diff

File 7697.diff, 2.0 KB (added by Chris Beaven, 15 years ago)
  • django/views/debug.py

    diff --git a/django/views/debug.py b/django/views/debug.py
    index 6efed55..58d0f0b 100644
    a b TECHNICAL_500_TEMPLATE = """  
    409409<body>
    410410<div id="summary">
    411411  <h1>{{ exception_type }} at {{ request.path_info|escape }}</h1>
    412   <pre class="exception_value">{{ exception_value|escape }}</pre>
     412  <pre class="exception_value">{{ exception_value|force_escape }}</pre>
    413413  <table class="meta">
    414414    <tr>
    415415      <th>Request Method:</th>
    TECHNICAL_500_TEMPLATE = """  
    425425    </tr>
    426426    <tr>
    427427      <th>Exception Value:</th>
    428       <td><pre>{{ exception_value|escape }}</pre></td>
     428      <td><pre>{{ exception_value|force_escape }}</pre></td>
    429429    </tr>
    430430    <tr>
    431431      <th>Exception Location:</th>
    TECHNICAL_500_TEMPLATE = """  
    452452{% if unicode_hint %}
    453453<div id="unicode-hint">
    454454    <h2>Unicode error hint</h2>
    455     <p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint|escape }}</strong></p>
     455    <p>The string that could not be encoded/decoded was: <strong>{{ unicode_hint|force_escape }}</strong></p>
    456456</div>
    457457{% endif %}
    458458{% if template_does_not_exist %}
    TECHNICAL_500_TEMPLATE = """  
    525525              <tbody>
    526526                {% for var in frame.vars|dictsort:"0" %}
    527527                  <tr>
    528                     <td>{{ var.0|escape }}</td>
    529                     <td class="code"><div>{{ var.1|pprint|escape }}</div></td>
     528                    <td>{{ var.0|force_escape }}</td>
     529                    <td class="code"><div>{{ var.1|pprint|force_escape }}</div></td>
    530530                  </tr>
    531531                {% endfor %}
    532532              </tbody>
    Traceback:  
    575575{% if frame.context_line %}  {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %}
    576576{% endfor %}
    577577Exception Type: {{ exception_type|escape }} at {{ request.path_info|escape }}
    578 Exception Value: {{ exception_value|escape }}
     578Exception Value: {{ exception_value|force_escape }}
    579579</textarea>
    580580  <br><br>
    581581  <input type="submit" value="Share this traceback on a public Web site">
Back to Top