From 8b7404e5316bb8119d8f6bd7dc1c5b77d5802357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 20 Apr 2022 13:05:11 +0200 Subject: [PATCH] Email on designation: allow raw characters As the content-type of the email is text/plain, we should not escape special character. Add the raw filter on string which will be escaped by twig. --- CHANGELOG.md | 1 + .../Notification/accompanying_course_designation.md.twig | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f26e64a1..b7681e5e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to * [Activity form] invert 'incoming' and 'receiving' in Activity form * [Activity form] keep the same order for 'attendee' field in new and edit form * [list with period] use "sameas" test operator to introduce requestor in list +* [notification email on course designation] allow raw string in email content generation ## Test releases diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Notification/accompanying_course_designation.md.twig b/src/Bundle/ChillPersonBundle/Resources/views/Notification/accompanying_course_designation.md.twig index 879df495e..8dd6558ac 100644 --- a/src/Bundle/ChillPersonBundle/Resources/views/Notification/accompanying_course_designation.md.twig +++ b/src/Bundle/ChillPersonBundle/Resources/views/Notification/accompanying_course_designation.md.twig @@ -1,14 +1,14 @@ -{{ 'period_notification.You are designated to a new period'|trans }} +{{ 'period_notification.You are designated to a new period'|trans|raw }} -{{ 'period_notification.See it online'|trans }}: +{{ 'period_notification.See it online'|trans|raw }}: {{ absolute_url(path('chill_person_accompanying_course_index', {'accompanying_period_id': accompanyingCourse.id}, false)) }} -{{ 'period_notification.Persons are'|trans }}: +{{ 'period_notification.Persons are'|trans|raw }}: {% for p in accompanyingCourse.getCurrentParticipations %} * {{ p.person|chill_entity_render_string }} {% endfor %} -{{ 'period_notification.Social issues are'|trans }}: {% for s in accompanyingCourse.socialIssues %}{{ s|chill_entity_render_string }}{% if not loop.last %}, {% endif %}{% endfor %}. +{{ 'period_notification.Social issues are'|trans|raw }}: {% for s in accompanyingCourse.socialIssues %}{{ s|chill_entity_render_string }}{% if not loop.last %}, {% endif %}{% endfor %}.