From cf61f2b59bb541bf6aee3da381da7b6a298a1e82 Mon Sep 17 00:00:00 2001
From: Ole Laursen <olau@iola.dk>
Date: Wed, 18 Dec 2013 13:38:13 +0000
Subject: [PATCH] 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

---
 ietf/secr/templates/proceedings/agenda.html            |  6 +++---
 .../templates/admin/group/group/send_sdo_reminder.html |  2 +-
 ietf/templates/doc/document_ballot_content.html        |  4 ++--
 ietf/templates/doc/document_draft.html                 |  2 +-
 ietf/templates/doc/document_history.html               |  2 +-
 ietf/templates/iesg/agenda_conflict_doc.html           |  6 +++---
 ietf/templates/iesg/feed_item_description.html         |  4 ++--
 ietf/templates/ipr/details.html                        |  2 +-
 ietf/templates/ipr/list_item.html                      | 10 +++++-----
 ietf/templates/ipr/search_doc_result.html              |  7 +++----
 ietf/templates/ipr/search_wg_result.html               |  8 ++++----
 ietf/templates/liaisons/feed_item_description.html     |  2 +-
 ietf/templates/nomcom/announcements.html               |  2 +-
 ietf/templates/nomcom/send_reminder_mail.html          |  2 +-
 ietf/templates/wginfo/milestones.html                  |  2 +-
 15 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/ietf/secr/templates/proceedings/agenda.html b/ietf/secr/templates/proceedings/agenda.html
index c573f0ff2..9c5fb4c6d 100644
--- a/ietf/secr/templates/proceedings/agenda.html
+++ b/ietf/secr/templates/proceedings/agenda.html
@@ -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>
diff --git a/ietf/templates/admin/group/group/send_sdo_reminder.html b/ietf/templates/admin/group/group/send_sdo_reminder.html
index 8ba2ca94a..eee4886e9 100644
--- a/ietf/templates/admin/group/group/send_sdo_reminder.html
+++ b/ietf/templates/admin/group/group/send_sdo_reminder.html
@@ -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>
diff --git a/ietf/templates/doc/document_ballot_content.html b/ietf/templates/doc/document_ballot_content.html
index 67e4eab34..1d1ee8d19 100644
--- a/ietf/templates/doc/document_ballot_content.html
+++ b/ietf/templates/doc/document_ballot_content.html
@@ -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 %}
 
diff --git a/ietf/templates/doc/document_draft.html b/ietf/templates/doc/document_draft.html
index ec66f774a..1a0e4d126 100644
--- a/ietf/templates/doc/document_draft.html
+++ b/ietf/templates/doc/document_draft.html
@@ -276,7 +276,7 @@
 
 <h4>Abstract</h4>
 
-<p>{{ doc.abstract|escape }}</p>
+<p>{{ doc.abstract }}</p>
 
 <h4>Authors</h4>
 
diff --git a/ietf/templates/doc/document_history.html b/ietf/templates/doc/document_history.html
index 36d3a556b..ec50b9cee 100644
--- a/ietf/templates/doc/document_history.html
+++ b/ietf/templates/doc/document_history.html
@@ -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>
diff --git a/ietf/templates/iesg/agenda_conflict_doc.html b/ietf/templates/iesg/agenda_conflict_doc.html
index 20278ae2f..23d331a16 100644
--- a/ietf/templates/iesg/agenda_conflict_doc.html
+++ b/ietf/templates/iesg/agenda_conflict_doc.html
@@ -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>
diff --git a/ietf/templates/iesg/feed_item_description.html b/ietf/templates/iesg/feed_item_description.html
index bd2a0b732..acc6d23b1 100644
--- a/ietf/templates/iesg/feed_item_description.html
+++ b/ietf/templates/iesg/feed_item_description.html
@@ -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 }}
diff --git a/ietf/templates/ipr/details.html b/ietf/templates/ipr/details.html
index 27e3d51d2..12780cb33 100644
--- a/ietf/templates/ipr/details.html
+++ b/ietf/templates/ipr/details.html
@@ -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" }})" />
diff --git a/ietf/templates/ipr/list_item.html b/ietf/templates/ipr/list_item.html
index 2fc67ef57..03fa0b462 100644
--- a/ietf/templates/ipr/list_item.html
+++ b/ietf/templates/ipr/list_item.html
@@ -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 %}
diff --git a/ietf/templates/ipr/search_doc_result.html b/ietf/templates/ipr/search_doc_result.html
index d80feebe9..6ad58d49c 100644
--- a/ietf/templates/ipr/search_doc_result.html
+++ b/ietf/templates/ipr/search_doc_result.html
@@ -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 %}
diff --git a/ietf/templates/ipr/search_wg_result.html b/ietf/templates/ipr/search_wg_result.html
index 30faa86f3..644dfce00 100644
--- a/ietf/templates/ipr/search_wg_result.html
+++ b/ietf/templates/ipr/search_wg_result.html
@@ -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 %}
diff --git a/ietf/templates/liaisons/feed_item_description.html b/ietf/templates/liaisons/feed_item_description.html
index 7575aee35..771cdac5b 100644
--- a/ietf/templates/liaisons/feed_item_description.html
+++ b/ietf/templates/liaisons/feed_item_description.html
@@ -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>
diff --git a/ietf/templates/nomcom/announcements.html b/ietf/templates/nomcom/announcements.html
index fab7722d7..24ad4830d 100644
--- a/ietf/templates/nomcom/announcements.html
+++ b/ietf/templates/nomcom/announcements.html
@@ -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 %}
diff --git a/ietf/templates/nomcom/send_reminder_mail.html b/ietf/templates/nomcom/send_reminder_mail.html
index fb8e15605..9bc7c9555 100644
--- a/ietf/templates/nomcom/send_reminder_mail.html
+++ b/ietf/templates/nomcom/send_reminder_mail.html
@@ -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 %}
diff --git a/ietf/templates/wginfo/milestones.html b/ietf/templates/wginfo/milestones.html
index 7951811a2..bb04907a5 100644
--- a/ietf/templates/wginfo/milestones.html
+++ b/ietf/templates/wginfo/milestones.html
@@ -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 %}