Skip to content

Commit 2b3218f

Browse files
fix: prevent HTML encoding in names
1 parent 442779d commit 2b3218f

8 files changed

+20
-12
lines changed

packages/emails/src/templates/AttendeeRequestEmail.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const AttendeeRequestEmail = (props: React.ComponentProps<typeof Attendee
1515
props.calEvent.recurringEvent?.count
1616
? "user_needs_to_confirm_or_reject_booking_recurring"
1717
: "user_needs_to_confirm_or_reject_booking",
18-
{ user: props.calEvent.organizer.name }
18+
{ user: props.calEvent.organizer.name, interpolation: { escapeValue: false } }
1919
)}
2020
</>
2121
}

packages/emails/src/templates/AttendeeWasRequestedToRescheduleEmail.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const AttendeeWasRequestedToRescheduleEmail = (
1313
<>
1414
{t("request_reschedule_subtitle", {
1515
organizer: props.calEvent.organizer.name,
16+
interpolation: { escapeValue: false },
1617
})}
1718
</>
1819
}

packages/emails/src/templates/BaseScheduledEmail.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export const BaseScheduledEmail = (
4848
date: `${getRecipientStart("h:mma")} - ${getRecipientEnd("h:mma")}, ${t(
4949
getRecipientStart("dddd").toLowerCase()
5050
)}, ${t(getRecipientStart("MMMM").toLowerCase())} ${getRecipientStart("D, YYYY")}`,
51+
interpolation: { escapeValue: false },
5152
});
5253

5354
let rescheduledBy = props.calEvent.rescheduledBy;

packages/emails/src/templates/CreditBalanceLimitReachedEmail.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ export const CreditBalanceLimitReachedEmail = (
2626

2727
if (team) {
2828
return (
29-
<V2BaseEmailHtml subject={user.t("action_required_out_of_credits", { teamName: team.name })}>
29+
<V2BaseEmailHtml subject={user.t("action_required_out_of_credits", { teamName: team.name, interpolation: { escapeValue: false } })}>
3030
<p style={{ fontWeight: 400, lineHeight: "24px" }}>
31-
<> {user.t("hi_user_name", { name: user.name })},</>
31+
<> {user.t("hi_user_name", { name: user.name, interpolation: { escapeValue: false } })},</>
3232
</p>
3333
<p style={{ fontWeight: 400, lineHeight: "24px", marginBottom: "20px" }}>
3434
<>
3535
{isCalAi
36-
? user.t("cal_ai_credit_limit_reached_message", { teamName: team.name })
37-
: user.t("credit_limit_reached_message", { teamName: team.name })}
36+
? user.t("cal_ai_credit_limit_reached_message", { teamName: team.name, interpolation: { escapeValue: false } })
37+
: user.t("credit_limit_reached_message", { teamName: team.name, interpolation: { escapeValue: false } })}
3838
</>
3939
</p>
4040
<div style={{ textAlign: "center", marginTop: "24px" }}>
@@ -51,7 +51,7 @@ export const CreditBalanceLimitReachedEmail = (
5151
return (
5252
<V2BaseEmailHtml subject={user.t("action_required_user_out_of_credits")}>
5353
<p style={{ fontWeight: 400, lineHeight: "24px" }}>
54-
<> {user.t("hi_user_name", { name: user.name })},</>
54+
<> {user.t("hi_user_name", { name: user.name, interpolation: { escapeValue: false } })},</>
5555
</p>
5656
<p style={{ fontWeight: 400, lineHeight: "24px", marginBottom: "20px" }}>
5757
<>

packages/emails/src/templates/CreditBalanceLowWarningEmail.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ export const CreditBalanceLowWarningEmail = (
2727

2828
if (team) {
2929
return (
30-
<V2BaseEmailHtml subject={user.t("team_credits_low_warning", { teamName: team.name })}>
30+
<V2BaseEmailHtml subject={user.t("team_credits_low_warning", { teamName: team.name, interpolation: { escapeValue: false } })}>
3131
<p style={{ fontWeight: 400, lineHeight: "24px" }}>
32-
<> {user.t("hi_user_name", { name: user.name })},</>
32+
<> {user.t("hi_user_name", { name: user.name, interpolation: { escapeValue: false } })},</>
3333
</p>
3434
<p style={{ fontWeight: 400, lineHeight: "24px", marginBottom: "20px" }}>
3535
<>
3636
{isCalAi
37-
? user.t("cal_ai_low_credits_warning_message", { teamName: team.name })
38-
: user.t("low_credits_warning_message", { teamName: team.name })}
37+
? user.t("cal_ai_low_credits_warning_message", { teamName: team.name, interpolation: { escapeValue: false } })
38+
: user.t("low_credits_warning_message", { teamName: team.name, interpolation: { escapeValue: false } })}
3939
</>
4040
</p>
4141
<p
@@ -60,7 +60,7 @@ export const CreditBalanceLowWarningEmail = (
6060
return (
6161
<V2BaseEmailHtml subject={user.t("user_credits_low_warning")}>
6262
<p style={{ fontWeight: 400, lineHeight: "24px" }}>
63-
<> {user.t("hi_user_name", { name: user.name })},</>
63+
<> {user.t("hi_user_name", { name: user.name, interpolation: { escapeValue: false } })},</>
6464
</p>
6565
<p style={{ fontWeight: 400, lineHeight: "24px", marginBottom: "20px" }}>
6666
<>

packages/emails/src/templates/OrganizerPaymentRefundFailedEmail.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const OrganizerPaymentRefundFailedEmail = (
1616
<>
1717
{t("check_with_provider_and_user", {
1818
user: props.calEvent.attendees[0].name,
19+
interpolation: { escapeValue: false },
1920
})}
2021
</>
2122
}>

packages/emails/src/templates/OrganizerRequestedToRescheduleEmail.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ export const OrganizerRequestedToRescheduleEmail = (
66
<OrganizerScheduledEmail
77
title={props.calEvent.organizer.language.translate("request_reschedule_title_organizer", {
88
attendee: props.calEvent.attendees[0].name,
9+
interpolation: { escapeValue: false },
910
})}
1011
subtitle={
1112
<>
1213
{props.calEvent.organizer.language.translate("request_reschedule_subtitle_organizer", {
1314
attendee: props.calEvent.attendees[0].name,
15+
interpolation: { escapeValue: false },
1416
})}
1517
</>
1618
}

packages/emails/src/templates/OrganizerScheduledEmail.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ export const OrganizerScheduledEmail = (
5555
) : (
5656
<>
5757
{props.attendeeCancelled
58-
? t("attendee_no_longer_attending_subtitle", { name: props.attendee.name })
58+
? t("attendee_no_longer_attending_subtitle", {
59+
name: props.attendee.name,
60+
interpolation: { escapeValue: false },
61+
})
5962
: ""}
6063
</>
6164
)

0 commit comments

Comments
 (0)