From 2e37a0f845d75479796b3a1680c89703aa66b30a Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Sun, 24 Jul 2022 10:29:11 -0400 Subject: [PATCH 1/3] fix: Don't run `striptags` on event descriptions that are emailed Remove the `textify` filter, which is now unused. Fixes #3600 --- ietf/doc/templatetags/ietf_filters.py | 7 ------- ietf/templates/community/notification_email.txt | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index d2450fa62bf..935d60a2c0c 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -455,13 +455,6 @@ def doc_edit_button(url_name, *args, **kwargs): """Given URL name/args/kwargs, looks up the URL just like "url" tag and returns a properly formatted button for the document material tables.""" return mark_safe('Edit' % (urlreverse(url_name, args=args, kwargs=kwargs))) -@register.filter -def textify(text): - text = re.sub("", "*", text) - text = re.sub("", "/", text) - # There are probably additional conversions we should apply here - return text - @register.filter def state(doc, slug): if slug == "stream": # convenient shorthand diff --git a/ietf/templates/community/notification_email.txt b/ietf/templates/community/notification_email.txt index bd0b0177f45..6b179d76976 100644 --- a/ietf/templates/community/notification_email.txt +++ b/ietf/templates/community/notification_email.txt @@ -8,7 +8,7 @@ Document: {{ event.doc }}, Change by {{ event.by }} on {{ event.time }}: -{{ event.desc|textify|striptags }} +{{ event.desc }} Best regards, From e38e268e290835c055e216ee32c7b69c53acf55f Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Sun, 24 Jul 2022 11:22:39 -0400 Subject: [PATCH 2/3] Update ietf_filters.py --- ietf/doc/templatetags/ietf_filters.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index 935d60a2c0c..d2450fa62bf 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -455,6 +455,13 @@ def doc_edit_button(url_name, *args, **kwargs): """Given URL name/args/kwargs, looks up the URL just like "url" tag and returns a properly formatted button for the document material tables.""" return mark_safe('Edit' % (urlreverse(url_name, args=args, kwargs=kwargs))) +@register.filter +def textify(text): + text = re.sub("", "*", text) + text = re.sub("", "/", text) + # There are probably additional conversions we should apply here + return text + @register.filter def state(doc, slug): if slug == "stream": # convenient shorthand From fb6fd110e861de4e1de3cfae13298d235e013178 Mon Sep 17 00:00:00 2001 From: Lars Eggert Date: Sun, 24 Jul 2022 11:22:56 -0400 Subject: [PATCH 3/3] Update notification_email.txt --- ietf/templates/community/notification_email.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/templates/community/notification_email.txt b/ietf/templates/community/notification_email.txt index 6b179d76976..d3a6c2214b8 100644 --- a/ietf/templates/community/notification_email.txt +++ b/ietf/templates/community/notification_email.txt @@ -8,7 +8,7 @@ Document: {{ event.doc }}, Change by {{ event.by }} on {{ event.time }}: -{{ event.desc }} +{{ event.desc|textify }} Best regards,