Skip to content

Commit

Permalink
fix: Linkify email address lists one-by-one (#6315)
Browse files Browse the repository at this point in the history
* fix: Linkify email address lists one-by-one

Seems to work around a bug in mozilla/bleach.

Fixes #6307

* Cosmetic change

* Fix test
  • Loading branch information
larseggert committed Sep 15, 2023
1 parent d825888 commit 303ff70
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 10 additions & 2 deletions ietf/templates/doc/document_email.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,16 @@ <h2 class="my-3">Recipient expansions</h2>
<a href="{% url 'ietf.mailtrigger.views.show_triggers' trigger %}"
title="{{ desc }}">{{ trigger }}</a>
</td>
<td>{{ to|join:', '|linkify }}</td>
<td>{{ cc|join:', '|linkify }}</td>
<td>
{% for addr in to %}
{{ addr|linkify }}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
<td>
{% for addr in cc %}
{{ addr|linkify }}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down
4 changes: 1 addition & 3 deletions ietf/templates/doc/review/complete_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ <h1>
</p>
<p>
If you enter the review below, the review will be sent
to {{ review_to|join:", "|linkify }}
{% if review_cc %}, with a CC to {{ review_cc|join:", "|linkify }}{% endif %}
.
to {% for addr in to %}{{ addr|linkify }}{% if not forloop.last %}, {% endif %}{% endfor %}{% if review_cc %}, with a CC to {% for addr in cc %}{{ addr|linkify }}{% if not forloop.last %}, {% endif %}{% endfor %}{% endif %}.
</p>
{% elif assignment %}
<p>
Expand Down
12 changes: 10 additions & 2 deletions ietf/templates/group/email.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,16 @@ <h2 class="mt-3">Recipient expansions</h2>
<a href="{% url 'ietf.mailtrigger.views.show_triggers' trigger %}"
title="{{ desc }}">{{ trigger }}</a>
</td>
<td>{{ to|join:', '|unescape|linkify }}</td>
<td>{{ cc|join:', '|unescape|linkify }}</td>
<td>
{% for addr in to %}
{{ addr|linkify }}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
<td>
{% for addr in cc %}
{{ addr|linkify }}{% if not forloop.last %}, {% endif %}
{% endfor %}
</td>
</tr>
{% endfor %}
</tbody>
Expand Down

0 comments on commit 303ff70

Please sign in to comment.