From 302495d3b58e731617ebc66a089fc5986d7300a4 Mon Sep 17 00:00:00 2001 From: Luke Vella Date: Mon, 30 Sep 2024 13:14:38 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20escaped=20values=20in=20em?= =?UTF-8?q?ails=20(#1368)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/emails/src/templates/finalized-host.tsx | 5 ++++- packages/emails/src/templates/finalized-participant.tsx | 4 ++++ packages/emails/src/templates/new-comment.tsx | 4 ++++ packages/emails/src/templates/new-participant.tsx | 3 +++ packages/emails/src/templates/new-poll.tsx | 4 ++++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/emails/src/templates/finalized-host.tsx b/packages/emails/src/templates/finalized-host.tsx index 7fd114b90..8bba8b85e 100644 --- a/packages/emails/src/templates/finalized-host.tsx +++ b/packages/emails/src/templates/finalized-host.tsx @@ -39,7 +39,6 @@ const FinalizeHostEmail = ({ ns: "emails", defaultValue: "Final date booked! We've notified participants and sent them calendar invites.", - title, })} > @@ -55,6 +54,7 @@ const FinalizeHostEmail = ({ i18nKey="finalizeHost_content" ns="emails" values={{ title }} + shouldUnescape={true} components={{ b: , }} @@ -126,6 +126,9 @@ FinalizeHostEmail.getSubject = ( defaultValue: "Date booked for {{title}}", title: props.title, ns: "emails", + interpolation: { + escapeValue: false, + }, }); }; diff --git a/packages/emails/src/templates/finalized-participant.tsx b/packages/emails/src/templates/finalized-participant.tsx index 2dd047197..f2b12d2ca 100644 --- a/packages/emails/src/templates/finalized-participant.tsx +++ b/packages/emails/src/templates/finalized-participant.tsx @@ -53,6 +53,7 @@ const FinalizeParticipantEmail = ({ ns="emails" defaults="{{hostName}} has booked {{title}} for the following date:" values={{ hostName, title }} + shouldUnescape={true} components={{ b: , }} @@ -117,6 +118,9 @@ FinalizeParticipantEmail.getSubject = ( defaultValue: "Date booked for {{title}}", title: props.title, ns: "emails", + interpolation: { + escapeValue: false, + }, }); }; diff --git a/packages/emails/src/templates/new-comment.tsx b/packages/emails/src/templates/new-comment.tsx index ac2c878bf..fffdfda8b 100644 --- a/packages/emails/src/templates/new-comment.tsx +++ b/packages/emails/src/templates/new-comment.tsx @@ -42,6 +42,7 @@ const NewCommentEmail = ({ ns="emails" i18nKey="newComment_content" defaults="{{authorName}} has commented on {{title}}." + shouldUnescape={true} components={{ b: , }} @@ -64,6 +65,9 @@ NewCommentEmail.getSubject = ( defaultValue: "{{authorName}} has commented on {{title}}", authorName: props.authorName, title: props.title, + interpolation: { + escapeValue: false, + }, }); }; diff --git a/packages/emails/src/templates/new-participant.tsx b/packages/emails/src/templates/new-participant.tsx index 7a50aa959..270c27117 100644 --- a/packages/emails/src/templates/new-participant.tsx +++ b/packages/emails/src/templates/new-participant.tsx @@ -69,6 +69,9 @@ NewParticipantEmail.getSubject = ( name: props.participantName, title: props.title, ns: "emails", + interpolation: { + escapeValue: false, + }, }); }; diff --git a/packages/emails/src/templates/new-poll.tsx b/packages/emails/src/templates/new-poll.tsx index de43f6a6d..a7dad976f 100644 --- a/packages/emails/src/templates/new-poll.tsx +++ b/packages/emails/src/templates/new-poll.tsx @@ -46,6 +46,7 @@ export const NewPollEmail = ({ i18nKey="newPoll_content" ns="emails" values={{ title }} + shouldUnescape={true} components={{ b: , }} @@ -71,6 +72,9 @@ NewPollEmail.getSubject = (props: NewPollEmailProps, ctx: EmailContext) => { return ctx.t("newPoll_subject", { defaultValue: "Let's find a date for {{title}}!", title: props.title, + interpolation: { + escapeValue: false, + }, ns: "emails", }); };