From 303ff70e641dfdb8b8f9a313f1f7978dd92af030 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Fri, 15 Sep 2023 18:45:58 +0300 Subject: [PATCH] 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 --- ietf/templates/doc/document_email.html | 12 ++++++++++-- ietf/templates/doc/review/complete_review.html | 4 +--- ietf/templates/group/email.html | 12 ++++++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ietf/templates/doc/document_email.html b/ietf/templates/doc/document_email.html index 768bf78e4..935217367 100644 --- a/ietf/templates/doc/document_email.html +++ b/ietf/templates/doc/document_email.html @@ -49,8 +49,16 @@ {{ trigger }} - {{ to|join:', '|linkify }} - {{ cc|join:', '|linkify }} + + {% for addr in to %} + {{ addr|linkify }}{% if not forloop.last %}, {% endif %} + {% endfor %} + + + {% for addr in cc %} + {{ addr|linkify }}{% if not forloop.last %}, {% endif %} + {% endfor %} + {% endfor %} diff --git a/ietf/templates/doc/review/complete_review.html b/ietf/templates/doc/review/complete_review.html index 40f8913ac..c6306c022 100644 --- a/ietf/templates/doc/review/complete_review.html +++ b/ietf/templates/doc/review/complete_review.html @@ -66,9 +66,7 @@

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 %}.

{% elif assignment %}

diff --git a/ietf/templates/group/email.html b/ietf/templates/group/email.html index 5dace7291..4a1f4b6de 100644 --- a/ietf/templates/group/email.html +++ b/ietf/templates/group/email.html @@ -47,8 +47,16 @@ {{ trigger }} - {{ to|join:', '|unescape|linkify }} - {{ cc|join:', '|unescape|linkify }} + + {% for addr in to %} + {{ addr|linkify }}{% if not forloop.last %}, {% endif %} + {% endfor %} + + + {% for addr in cc %} + {{ addr|linkify }}{% if not forloop.last %}, {% endif %} + {% endfor %} + {% endfor %}