Sanitize HTML emails

This commit is contained in:
Hillel Coren 2018-10-08 10:29:38 +03:00
parent fcf9b6149d
commit 0edf372526

View file

@ -188,8 +188,14 @@ class ContactMailer extends Mailer
}
}
$body = $this->templateService->processVariables($body, $variables);
if (Utils::isNinja()) {
$body = \HTMLUtils::sanitizeHTML($body);
}
$data = [
'body' => $this->templateService->processVariables($body, $variables),
'body' => $body,
'link' => $invitation->getLink(),
'entityType' => $proposal ? ENTITY_PROPOSAL : $invoice->getEntityType(),
'invoiceId' => $invoice->id,