Skip to content

Commit cf61f2b

Browse files
committed
Remove a bunch of unnecessary |escape filter calls, auto-escaping is enabled by default so manual escape is only necessary in few cases
- Legacy-Id: 6981
1 parent b84440b commit cf61f2b

15 files changed

Lines changed: 30 additions & 31 deletions

ietf/secr/templates/proceedings/agenda.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ <h2 class="ietf-divider">{{ slot.time|date:"l"|upper }}, {{ slot.time|date:"F j,
2727
<td colspan="5">
2828
<b>{{slot.name}}</b>
2929
{% if slot.type.name != 'Session' %}
30-
{% if slot.show_location %} - {{slot.get_location|escape}}{% endif %}
30+
{% if slot.show_location %} - {{slot.get_location}}{% endif %}
3131
{% endif %}
3232
</td>
3333
</tr>
3434
{% endifchanged %}
3535
{% if slot.type.name = 'Session' %} {% if slot.session.group %}
3636
<tr id="{{meeting.number}}-{{slot.time|date:"D-Hi"|lower}}-{{slot.session.group.parent.acronym|upper}}-{{slot.session.group.acronym|lower}}" class="grouprow">
37-
<td style="width:200px">{% if slot.show_location %}{{slot.get_location|escape}}{% endif %}</td>
37+
<td style="width:200px">{% if slot.show_location %}{{slot.get_location}}{% endif %}</td>
3838
<td style="width:50px">{{slot.session.group.parent.acronym|upper}}</td>
3939
<td style="width:100px">
4040
{% if slot.session.group.charter %}<a href="{{slot.session.group.charter.get_absolute_url}}">{{slot.session.group.acronym}}</a>
@@ -50,7 +50,7 @@ <h2 class="ietf-divider">{{ slot.time|date:"l"|upper }}, {{ slot.time|date:"F j,
5050
{% endif %} {% endif %}
5151
{% if slot.type.name = 'Plenary' %}
5252
<tr class="grouprow">
53-
<td style="width:200px">{% if slot.show_location %}{{slot.get_location|escape}}{% endif %}</td>
53+
<td style="width:200px">{% if slot.show_location %}{{slot.get_location}}{% endif %}</td>
5454
<td></td>
5555
<td></td>
5656
<td>{% if slot.session.agenda %}<a href="{{ slot.session.agenda.get_absolute_url }}">Agenda</a>

ietf/templates/admin/group/group/send_sdo_reminder.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{% block breadcrumbs %}{% if not is_popup %}
1010
<div class="breadcrumbs">
1111
<a href="../../../">{% trans "Home" %}</a> &rsaquo;
12-
<a href="../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
12+
<a href="../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
1313
{% if has_change_permission %}<a href="../">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} &rsaquo;
1414
{% trans "Send reminder" %}
1515
</div>

ietf/templates/doc/document_ballot_content.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ <h2 id="{{ p.ad.plain_name|slugify }}" class="ad-ballot-comment">{% if p.old_ad
6262

6363
{% if p.pos.blocking and p.discuss %}
6464
<p><b>{{ p.pos.name }} ({{ p.discuss_time|date:"Y-m-d" }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
65-
<pre>{{ p.discuss|wrap_text:80|escape }}</pre>
65+
<pre>{{ p.discuss|wrap_text:80 }}</pre>
6666
{% endif %}
6767

6868
{% if p.comment %}
6969
<p><b>Comment ({{ p.comment_time|date:"Y-m-d" }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
70-
<pre>{{ p.comment|wrap_text:80|escape }}</pre>
70+
<pre>{{ p.comment|wrap_text:80 }}</pre>
7171
{% endif %}
7272
{% endfor %}
7373

ietf/templates/doc/document_draft.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@
276276

277277
<h4>Abstract</h4>
278278

279-
<p>{{ doc.abstract|escape }}</p>
279+
<p>{{ doc.abstract }}</p>
280280

281281
<h4>Authors</h4>
282282

ietf/templates/doc/document_history.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ <h2>Document history</h2>
6868
<tr class="{% cycle oddrow,evenrow %}" id="history-{{ e.pk }}">
6969
<td>{{ e.time|date:"Y-m-d" }}</td>
7070
<td>{{ e.rev }}</td>
71-
<td>{{ e.by|escape }}</td>
71+
<td>{{ e.by }}</td>
7272
<td>{{ e.desc|format_history_text }}
7373
</td>
7474
</tr>

ietf/templates/iesg/agenda_conflict_doc.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
<a href="{% url "doc_view" name=doc.name %}">{{doc.name}}-{{doc.rev}}</a>
99
<a href="http://www.ietf.org/id/{{doc.name}}-{{doc.rev}}.txt">[txt]</a>
1010

11-
<br/>{{ doc.title|escape }}
11+
<br/>{{ doc.title }}
1212

1313
{% with doc.conflictdoc as conflictdoc %}
1414

1515
<div style="padding-left:30px;">
1616
<a href="{% url "doc_view" name=conflictdoc.name %}">{{ conflictdoc.name }}-{{ conflictdoc.rev }}</a>
1717
<a href="http://www.ietf.org/id/{{ conflictdoc.name }}-{{ conflictdoc.rev }}.txt">[txt]</a>
18-
<br/>{{ conflictdoc.title|escape }} ({{ conflictdoc.stream }}: {{ conflictdoc.intended_std_level }})
18+
<br/>{{ conflictdoc.title }} ({{ conflictdoc.stream }}: {{ conflictdoc.intended_std_level }})
1919
{% if conflictdoc.note %}
2020
<br/>Note: {{ conflictdoc.note|linebreaksbr }}
2121
{% endif %}
@@ -26,7 +26,7 @@ <h5>IPR:</h5>
2626
<ul>
2727
{% for ipr in conflictdoc.ipr %}
2828
{% if ipr.ipr.status == 1 %}
29-
<li><a href="/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title|escape }}</a></li>
29+
<li><a href="/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title }}</a></li>
3030
{% endif %}
3131
{% endfor %}
3232
</ul>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{# Copyright The IETF Trust 2008, All Rights Reserved #}
2-
{{ obj.title|escape }}<br>
3-
{{ obj.abstract|escape|truncatewords:50 }}
2+
{{ obj.title }}<br>
3+
{{ obj.abstract|truncatewords:50 }}

ietf/templates/ipr/details.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% extends "base.html" %}
22
{# Copyright The IETF Trust 2007, All Rights Reserved #}
33

4-
{% block title %}IPR Details - {{ ipr.title|escape }}{% endblock %}
4+
{% block title %}IPR Details - {{ ipr.title }}{% endblock %}
55

66
{% block pagehead %}
77
<meta name="description" content="IPR disclosure #{{ipr.ipr_id}}: {{ ipr.title }} ({{ ipr.submitted_date|date:"Y" }})" />

ietf/templates/ipr/list_item.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<td>{{ ipr.ipr_id }}</td>
55
<td>
66
{% if ipr.status == 1 %}
7-
<a href="{% url "ietf.ipr.views.show" ipr.ipr_id %}">{{ ipr.title|escape }}</a>
7+
<a href="{% url "ietf.ipr.views.show" ipr.ipr_id %}">{{ ipr.title }}</a>
88
{% else %}
9-
{{ ipr.title|escape }}
10-
<br/>This IPR disclosure was removed at the request of the submitter.
9+
{{ ipr.title }}
10+
<br/>This IPR disclosure was removed at the request of the submitter.
1111
{% endif %}
1212
<br />
1313
{% for item in ipr.updates.all %}
@@ -29,7 +29,7 @@
2929
<td></td>
3030
<td>
3131
<b>*</b>
32-
<a href="{{ ipr.legacy_url_1 }}">{{ ipr.legacy_title_1|escape }}</a>
32+
<a href="{{ ipr.legacy_url_1 }}">{{ ipr.legacy_title_1 }}</a>
3333
</td>
3434
</tr>
3535
{% endif %}
@@ -39,7 +39,7 @@
3939
<td></td>
4040
<td>
4141
<b>*</b>
42-
<a href="{{ ipr.legacy_url_2 }}">{{ ipr.legacy_title_2|escape }}</a>
42+
<a href="{{ ipr.legacy_url_2 }}">{{ ipr.legacy_title_2 }}</a>
4343
</td>
4444
</tr>
4545
{% endif %}

ietf/templates/ipr/search_doc_result.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<tr valign="top" bgcolor="#dadada">
1010
<td width="100">{{ ipr.submitted_date }}</td>
1111
<td width="90"><li>ID # {{ ipr.ipr_id }}</li></td>
12-
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title|escape }}"</a></td>
12+
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title }}"</a></td>
1313
</tr>
1414
{% endfor %}
1515

@@ -18,16 +18,15 @@
1818
<tbody bgcolor="#{% cycle dadada,eaeaea as bgcolor %}">
1919
<tr >
2020
<td colspan="3">
21-
Search result on {{ doc.name|rfcspace|lstrip:"0"|rfcnospace }}, "{{ doc.document.title|escape }}"{% if not forloop.first %}{% if doc.related %}, that was {{ doc.relation|lower }} {{ doc.related.source|rfcspace|lstrip:"0"|rfcnospace }}, "{{ doc.related.source.title }}"{% endif %}
22-
{% endif %}
21+
Search result on {{ doc.name|rfcspace|lstrip:"0"|rfcnospace }}, "{{ doc.document.title }}"{% if not forloop.first %}{% if doc.related %}, that was {{ doc.relation|lower }} {{ doc.related.source|rfcspace|lstrip:"0"|rfcnospace }}, "{{ doc.related.source.title }}"{% endif %}{% endif %}
2322
</td>
2423
</tr>
2524
{% if doc.iprs %}
2625
{% for ipr in doc.iprs %}
2726
<tr valign="top">
2827
<td width="100">{{ ipr.submitted_date }}</td>
2928
<td width="90"><li>ID # {{ ipr.ipr_id }}</li></td>
30-
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title|escape }}"</a></td>
29+
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title }}"</a></td>
3130
</tr>
3231
{% endfor %}
3332
{% else %}

0 commit comments

Comments
 (0)