fix: Linkify email address lists one-by-one (#6315)

* fix: Linkify email address lists one-by-one

Seems to work around a bug in mozilla/bleach.

Fixes #6307

* Cosmetic change

* Fix test
This commit is contained in:
Lars Eggert 2023-09-15 18:45:58 +03:00 committed by GitHub
parent d82588835d
commit 303ff70e64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 7 deletions

View file

@ -49,8 +49,16 @@
<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>

View file

@ -66,9 +66,7 @@
</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>

View file

@ -47,8 +47,16 @@
<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>