🐛 Fix escaped values in emails (#1368)

This commit is contained in:
Luke Vella 2024-09-30 13:14:38 +01:00 committed by GitHub
parent d05fff69bc
commit 302495d3b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 19 additions and 1 deletions

View file

@ -39,7 +39,6 @@ const FinalizeHostEmail = ({
ns: "emails",
defaultValue:
"Final date booked! We've notified participants and sent them calendar invites.",
title,
})}
>
<Heading>
@ -55,6 +54,7 @@ const FinalizeHostEmail = ({
i18nKey="finalizeHost_content"
ns="emails"
values={{ title }}
shouldUnescape={true}
components={{
b: <strong />,
}}
@ -126,6 +126,9 @@ FinalizeHostEmail.getSubject = (
defaultValue: "Date booked for {{title}}",
title: props.title,
ns: "emails",
interpolation: {
escapeValue: false,
},
});
};

View file

@ -53,6 +53,7 @@ const FinalizeParticipantEmail = ({
ns="emails"
defaults="<b>{{hostName}}</b> has booked <b>{{title}}</b> for the following date:"
values={{ hostName, title }}
shouldUnescape={true}
components={{
b: <strong />,
}}
@ -117,6 +118,9 @@ FinalizeParticipantEmail.getSubject = (
defaultValue: "Date booked for {{title}}",
title: props.title,
ns: "emails",
interpolation: {
escapeValue: false,
},
});
};

View file

@ -42,6 +42,7 @@ const NewCommentEmail = ({
ns="emails"
i18nKey="newComment_content"
defaults="<b>{{authorName}}</b> has commented on <b>{{title}}</b>."
shouldUnescape={true}
components={{
b: <strong />,
}}
@ -64,6 +65,9 @@ NewCommentEmail.getSubject = (
defaultValue: "{{authorName}} has commented on {{title}}",
authorName: props.authorName,
title: props.title,
interpolation: {
escapeValue: false,
},
});
};

View file

@ -69,6 +69,9 @@ NewParticipantEmail.getSubject = (
name: props.participantName,
title: props.title,
ns: "emails",
interpolation: {
escapeValue: false,
},
});
};

View file

@ -46,6 +46,7 @@ export const NewPollEmail = ({
i18nKey="newPoll_content"
ns="emails"
values={{ title }}
shouldUnescape={true}
components={{
b: <strong />,
}}
@ -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",
});
};