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
This commit is contained in:
Ole Laursen 2013-12-18 13:38:13 +00:00
parent b84440b857
commit cf61f2b59b
15 changed files with 30 additions and 31 deletions

View file

@ -27,14 +27,14 @@
<td colspan="5">
<b>{{slot.name}}</b>
{% if slot.type.name != 'Session' %}
{% if slot.show_location %} - {{slot.get_location|escape}}{% endif %}
{% if slot.show_location %} - {{slot.get_location}}{% endif %}
{% endif %}
</td>
</tr>
{% endifchanged %}
{% if slot.type.name = 'Session' %} {% if slot.session.group %}
<tr id="{{meeting.number}}-{{slot.time|date:"D-Hi"|lower}}-{{slot.session.group.parent.acronym|upper}}-{{slot.session.group.acronym|lower}}" class="grouprow">
<td style="width:200px">{% if slot.show_location %}{{slot.get_location|escape}}{% endif %}</td>
<td style="width:200px">{% if slot.show_location %}{{slot.get_location}}{% endif %}</td>
<td style="width:50px">{{slot.session.group.parent.acronym|upper}}</td>
<td style="width:100px">
{% if slot.session.group.charter %}<a href="{{slot.session.group.charter.get_absolute_url}}">{{slot.session.group.acronym}}</a>
@ -50,7 +50,7 @@
{% endif %} {% endif %}
{% if slot.type.name = 'Plenary' %}
<tr class="grouprow">
<td style="width:200px">{% if slot.show_location %}{{slot.get_location|escape}}{% endif %}</td>
<td style="width:200px">{% if slot.show_location %}{{slot.get_location}}{% endif %}</td>
<td></td>
<td></td>
<td>{% if slot.session.agenda %}<a href="{{ slot.session.agenda.get_absolute_url }}">Agenda</a>

View file

@ -9,7 +9,7 @@
{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
<a href="../../../">{% trans "Home" %}</a> &rsaquo;
<a href="../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
<a href="../../">{{ app_label|capfirst|escape }}</a> &rsaquo;
{% if has_change_permission %}<a href="../">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} &rsaquo;
{% trans "Send reminder" %}
</div>

View file

@ -62,12 +62,12 @@
{% if p.pos.blocking and p.discuss %}
<p><b>{{ p.pos.name }} ({{ p.discuss_time|date:"Y-m-d" }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
<pre>{{ p.discuss|wrap_text:80|escape }}</pre>
<pre>{{ p.discuss|wrap_text:80 }}</pre>
{% endif %}
{% if p.comment %}
<p><b>Comment ({{ p.comment_time|date:"Y-m-d" }})</b> <img src="/images/comment.png" width="14" height="12" alt=""/></p>
<pre>{{ p.comment|wrap_text:80|escape }}</pre>
<pre>{{ p.comment|wrap_text:80 }}</pre>
{% endif %}
{% endfor %}

View file

@ -276,7 +276,7 @@
<h4>Abstract</h4>
<p>{{ doc.abstract|escape }}</p>
<p>{{ doc.abstract }}</p>
<h4>Authors</h4>

View file

@ -68,7 +68,7 @@
<tr class="{% cycle oddrow,evenrow %}" id="history-{{ e.pk }}">
<td>{{ e.time|date:"Y-m-d" }}</td>
<td>{{ e.rev }}</td>
<td>{{ e.by|escape }}</td>
<td>{{ e.by }}</td>
<td>{{ e.desc|format_history_text }}
</td>
</tr>

View file

@ -8,14 +8,14 @@
<a href="{% url "doc_view" name=doc.name %}">{{doc.name}}-{{doc.rev}}</a>
<a href="http://www.ietf.org/id/{{doc.name}}-{{doc.rev}}.txt">[txt]</a>
<br/>{{ doc.title|escape }}
<br/>{{ doc.title }}
{% with doc.conflictdoc as conflictdoc %}
<div style="padding-left:30px;">
<a href="{% url "doc_view" name=conflictdoc.name %}">{{ conflictdoc.name }}-{{ conflictdoc.rev }}</a>
<a href="http://www.ietf.org/id/{{ conflictdoc.name }}-{{ conflictdoc.rev }}.txt">[txt]</a>
<br/>{{ conflictdoc.title|escape }} ({{ conflictdoc.stream }}: {{ conflictdoc.intended_std_level }})
<br/>{{ conflictdoc.title }} ({{ conflictdoc.stream }}: {{ conflictdoc.intended_std_level }})
{% if conflictdoc.note %}
<br/>Note: {{ conflictdoc.note|linebreaksbr }}
{% endif %}
@ -26,7 +26,7 @@
<ul>
{% for ipr in conflictdoc.ipr %}
{% if ipr.ipr.status == 1 %}
<li><a href="/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title|escape }}</a></li>
<li><a href="/ipr/{{ ipr.ipr.ipr_id }}/">{{ ipr.ipr.title }}</a></li>
{% endif %}
{% endfor %}
</ul>

View file

@ -1,3 +1,3 @@
{# Copyright The IETF Trust 2008, All Rights Reserved #}
{{ obj.title|escape }}<br>
{{ obj.abstract|escape|truncatewords:50 }}
{{ obj.title }}<br>
{{ obj.abstract|truncatewords:50 }}

View file

@ -1,7 +1,7 @@
{% extends "base.html" %}
{# Copyright The IETF Trust 2007, All Rights Reserved #}
{% block title %}IPR Details - {{ ipr.title|escape }}{% endblock %}
{% block title %}IPR Details - {{ ipr.title }}{% endblock %}
{% block pagehead %}
<meta name="description" content="IPR disclosure #{{ipr.ipr_id}}: {{ ipr.title }} ({{ ipr.submitted_date|date:"Y" }})" />

View file

@ -4,10 +4,10 @@
<td>{{ ipr.ipr_id }}</td>
<td>
{% if ipr.status == 1 %}
<a href="{% url "ietf.ipr.views.show" ipr.ipr_id %}">{{ ipr.title|escape }}</a>
<a href="{% url "ietf.ipr.views.show" ipr.ipr_id %}">{{ ipr.title }}</a>
{% else %}
{{ ipr.title|escape }}
<br/>This IPR disclosure was removed at the request of the submitter.
{{ ipr.title }}
<br/>This IPR disclosure was removed at the request of the submitter.
{% endif %}
<br />
{% for item in ipr.updates.all %}
@ -29,7 +29,7 @@
<td></td>
<td>
<b>*</b>
<a href="{{ ipr.legacy_url_1 }}">{{ ipr.legacy_title_1|escape }}</a>
<a href="{{ ipr.legacy_url_1 }}">{{ ipr.legacy_title_1 }}</a>
</td>
</tr>
{% endif %}
@ -39,7 +39,7 @@
<td></td>
<td>
<b>*</b>
<a href="{{ ipr.legacy_url_2 }}">{{ ipr.legacy_title_2|escape }}</a>
<a href="{{ ipr.legacy_url_2 }}">{{ ipr.legacy_title_2 }}</a>
</td>
</tr>
{% endif %}

View file

@ -9,7 +9,7 @@
<tr valign="top" bgcolor="#dadada">
<td width="100">{{ ipr.submitted_date }}</td>
<td width="90"><li>ID # {{ ipr.ipr_id }}</li></td>
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title|escape }}"</a></td>
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title }}"</a></td>
</tr>
{% endfor %}
@ -18,8 +18,7 @@
<tbody bgcolor="#{% cycle dadada,eaeaea as bgcolor %}">
<tr >
<td colspan="3">
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 %}
{% endif %}
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 %}
</td>
</tr>
{% if doc.iprs %}
@ -27,7 +26,7 @@
<tr valign="top">
<td width="100">{{ ipr.submitted_date }}</td>
<td width="90"><li>ID # {{ ipr.ipr_id }}</li></td>
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title|escape }}"</a></td>
<td><a href="{% url "ietf.ipr.views.show" ipr_id=ipr.ipr_id %}">"{{ ipr.title }}"</a></td>
</tr>
{% endfor %}
{% else %}

View file

@ -18,9 +18,9 @@
{% block iprlist %}
{% for alias in docs %}
<tbody bgcolor="#{% cycle dadada,eaeaea as bgcolor %}">
<tr >
<tr>
<td colspan="3">
IPR that is related to <b><i>{{ alias.name|rfcspace|lstrip:"0"|rfcnospace }}, "{{ alias.document.title|escape }}"{% if alias.related %}, that was {{ alias.relation|lower }} {{ alias.related.source|rfcspace|lstrip:"0"|rfcnospace }}, "{{ alias.related.source.title|escape }}"{% endif %}
IPR that is related to <b><i>{{ alias.name|rfcspace|lstrip:"0"|rfcnospace }}, "{{ alias.document.title }}"{% if alias.related %}, that was {{ alias.relation|lower }} {{ alias.related.source|rfcspace|lstrip:"0"|rfcnospace }}, "{{ alias.related.source.title|escape }}"{% endif %}
</i></b>{% if alias.product_of_this_wg %} which is a product of Working Group <b><i>{{ q }}</i></b>{% endif %}
</td>
</tr>
@ -32,10 +32,10 @@
<td>
{% for item in ipr.updates.all %}
{% if item.updated.status == 1 %}
IPR disclosure ID# {{ item.updated.ipr_id }}, "<a href="{% url "ietf.ipr.views.show" item.updated.ipr_id %}">{{ item.updated.title|escape }}</a>" Updated by
IPR disclosure ID# {{ item.updated.ipr_id }}, "<a href="{% url "ietf.ipr.views.show" item.updated.ipr_id %}">{{ item.updated.title }}</a>" Updated by
{% endif %}
{% endfor %}
<a href="{% url "ietf.ipr.views.show" ipr.ipr_id %}">"{{ ipr.title|escape }}"</a>
<a href="{% url "ietf.ipr.views.show" ipr.ipr_id %}">"{{ ipr.title }}"</a>
</td>
</tr>
{% endfor %}

View file

@ -1,4 +1,4 @@
{{ obj.body|truncatewords:"30"|wordwrap:"71"|escape|linebreaksbr }}
{{ obj.body|truncatewords:"30"|wordwrap:"71"|linebreaksbr }}
{% with obj.attachments.all as attachments %}
<h3>Attached Document{{ attachments|pluralize }}</h3>

View file

@ -23,7 +23,7 @@
{% for m in regime.announcements %}
<tr>
<td>{{ m.time|date:"Y-M-d" }}</td>
<td style="max-width:50%"><a href="{% url "nomcom_announcement" message_id=m.id %}">{{ m.subject|escape }}</a></td>
<td style="max-width:50%"><a href="{% url "nomcom_announcement" message_id=m.id %}">{{ m.subject }}</a></td>
<td>{{ m.to_name }}</td>
<tr>
{% endfor %}

View file

@ -43,6 +43,6 @@
<p>The message that will be sent is as follows: {% if mail_template %}<a href="{% url "nomcom_edit_template" year mail_template.id %}">(Edit the message)</a>{% endif %}</p>
<pre>{{ mail_template.content|wrap_text:80|escape }}</pre>
<pre>{{ mail_template.content|wrap_text:80 }}</pre>
{% endblock %}

View file

@ -7,7 +7,7 @@
{% if milestone.resolved %}{{ milestone.resolved }}{% else %}{{ milestone.due|date:"M Y" }}{% endif %}
</td>
<td>
<div>{{ milestone.desc|escape }}</div>
<div>{{ milestone.desc }}</div>
{% for d in milestone.docs.all %}
<a class="doc" href="{% url "doc_view" name=d.name %}">{{ d.name }}</a>
{% endfor %}