Fix save booking title unescaped (#7591)

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
authored and GitHub committed 2023-03-13 22:03:06 +00:00
1 parent 6c55138589
commit d545a9e127
4 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
import { decodeHTML } from "entities";
import nodemailer from "nodemailer";
import { z } from "zod";
@@ -40,7 +41,7 @@ export default class BaseEmail {
const parseSubject = z.string().safeParse(payload?.subject);
const payloadWithUnEscapedSubject = {
...payload,
...(parseSubject.success && { subject: decodeURIComponent(parseSubject.data) }),
...(parseSubject.success && { subject: decodeHTML(parseSubject.data) }),
};
new Promise((resolve, reject) =>