Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
fix(contact): Sanitize HTML in mail
Browse files Browse the repository at this point in the history
  • Loading branch information
desoindx committed Feb 15, 2022
1 parent a2e9079 commit 9cb8503
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ const mailTransport = nodemailer.createTransport({
});

export const sendMail = (to: string, subject: string, html: string) => {
const sanitizedHTML = sanitizeHtml(html);
const mail = {
from: `MonPsy <${config.supportMail}>`,
html,
html: sanitizedHTML,
subject,
text: sanitizeHtml(html),
text: sanitizedHTML,
to,
};

Expand Down

0 comments on commit 9cb8503

Please sign in to comment.