diff options
| author | Tim Graham <timograham@gmail.com> | 2017-08-01 10:52:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-01 10:52:29 -0400 |
| commit | 8df7681d0e3b39cda9393c8e59f13b5681cc2f2f (patch) | |
| tree | 99f29fab3ce5c7cf7aa59ccbb1e694d5f0fcebc1 | |
| parent | 53d2534b3813f46f373bbf751ac3baf21c50d405 (diff) | |
Removed unneeded escape filter in templates where autoescaping is enabled.
| -rw-r--r-- | django/contrib/admin/templates/admin/delete_confirmation.html | 2 | ||||
| -rw-r--r-- | django/views/templates/technical_404.html | 6 | ||||
| -rw-r--r-- | django/views/templates/technical_500.html | 20 |
3 files changed, 14 insertions, 14 deletions
diff --git a/django/contrib/admin/templates/admin/delete_confirmation.html b/django/contrib/admin/templates/admin/delete_confirmation.html index 09582c18ec..2dedc84491 100644 --- a/django/contrib/admin/templates/admin/delete_confirmation.html +++ b/django/contrib/admin/templates/admin/delete_confirmation.html @@ -13,7 +13,7 @@ <div class="breadcrumbs"> <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a> › <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a> -› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst|escape }}</a> +› <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a> › <a href="{% url opts|admin_urlname:'change' object.pk|admin_urlquote %}">{{ object|truncatewords:"18" }}</a> › {% trans 'Delete' %} </div> diff --git a/django/views/templates/technical_404.html b/django/views/templates/technical_404.html index b88fecf2eb..ec518f658e 100644 --- a/django/views/templates/technical_404.html +++ b/django/views/templates/technical_404.html @@ -2,7 +2,7 @@ <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> - <title>Page not found at {{ request.path_info|escape }}</title> + <title>Page not found at {{ request.path_info }}</title> <meta name="robots" content="NONE,NOARCHIVE"> <style type="text/css"> html * { padding:0; margin:0; } @@ -32,7 +32,7 @@ </tr> <tr> <th>Request URL:</th> - <td>{{ request.build_absolute_uri|escape }}</td> + <td>{{ request.build_absolute_uri }}</td> </tr> {% if raising_view_name %} <tr> @@ -60,7 +60,7 @@ </ol> <p> {% if request_path %} - The current path, <code>{{ request_path|escape }}</code>,{% else %} + The current path, <code>{{ request_path }}</code>,{% else %} The empty path{% endif %} didn't match any of these. </p> {% else %} diff --git a/django/views/templates/technical_500.html b/django/views/templates/technical_500.html index 413bedc537..cb3254b5c9 100644 --- a/django/views/templates/technical_500.html +++ b/django/views/templates/technical_500.html @@ -4,7 +4,7 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="robots" content="NONE,NOARCHIVE"> <title>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %} - {% if request %} at {{ request.path_info|escape }}{% endif %}</title> + {% if request %} at {{ request.path_info }}{% endif %}</title> <style type="text/css"> html * { padding:0; margin:0; } body * { padding:10px 20px; } @@ -106,7 +106,7 @@ <body> <div id="summary"> <h1>{% if exception_type %}{{ exception_type }}{% else %}Report{% endif %} - {% if request %} at {{ request.path_info|escape }}{% endif %}</h1> + {% if request %} at {{ request.path_info }}{% endif %}</h1> <pre class="exception_value">{% if exception_value %}{{ exception_value|force_escape }}{% else %}No exception message supplied{% endif %}</pre> <table class="meta"> {% if request %} @@ -116,7 +116,7 @@ </tr> <tr> <th>Request URL:</th> - <td>{{ request.get_raw_uri|escape }}</td> + <td>{{ request.get_raw_uri }}</td> </tr> {% endif %} <tr> @@ -138,12 +138,12 @@ {% if lastframe %} <tr> <th>Exception Location:</th> - <td>{{ lastframe.filename|escape }} in {{ lastframe.function|escape }}, line {{ lastframe.lineno }}</td> + <td>{{ lastframe.filename }} in {{ lastframe.function }}, line {{ lastframe.lineno }}</td> </tr> {% endif %} <tr> <th>Python Executable:</th> - <td>{{ sys_executable|escape }}</td> + <td>{{ sys_executable }}</td> </tr> <tr> <th>Python Version:</th> @@ -285,7 +285,7 @@ <div id="pastebinTraceback" class="pastebin"> <input type="hidden" name="language" value="PythonConsole"> <input type="hidden" name="title" - value="{{ exception_type|escape }}{% if request %} at {{ request.path_info|escape }}{% endif %}"> + value="{{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %}"> <input type="hidden" name="source" value="Django Dpaste Agent"> <input type="hidden" name="poster" value="Django"> <textarea name="content" id="traceback_area" cols="140" rows="25"> @@ -293,7 +293,7 @@ Environment: {% if request %} Request Method: {{ request.META.REQUEST_METHOD }} -Request URL: {{ request.get_raw_uri|escape }} +Request URL: {{ request.get_raw_uri }} {% endif %} Django Version: {{ django_version_info }} Python Version: {{ sys_version_info }} @@ -322,10 +322,10 @@ The above exception ({{ frame.exc_cause }}) was the direct cause of the followin {% else %} During handling of the above exception ({{ frame.exc_cause }}), another exception occurred: {% endif %}{% endif %}{% endifchanged %} -File "{{ frame.filename|escape }}" in {{ frame.function|escape }} -{% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line|escape }}{% endif %}{% endfor %} +File "{{ frame.filename }}" in {{ frame.function }} +{% if frame.context_line %} {{ frame.lineno }}. {{ frame.context_line }}{% endif %}{% endfor %} -Exception Type: {{ exception_type|escape }}{% if request %} at {{ request.path_info|escape }}{% endif %} +Exception Type: {{ exception_type }}{% if request %} at {{ request.path_info }}{% endif %} Exception Value: {{ exception_value|force_escape }} </textarea> <br><br> |
