Make sure the share email only ships sane HTML

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2018-02-01 14:49:53 +01:00
parent 0257b1969a
commit 34c17bb403
No known key found for this signature in database
GPG key ID: 7076EA9751AACDDA

View file

@ -248,9 +248,9 @@ class FileSharingBroadcaster implements IBroadcaster {
$emailTemplate->addHeader();
$emailTemplate->addHeading($subject, false);
$emailTemplate->addBodyText(
$text . "\n " . $this->l10n->t('Click the button below to open it.'), $text
htmlspecialchars($text) . '<br>' . htmlspecialchars($this->l10n->t('Click the button below to open it.')), $text
);
$emailTemplate->addBodyButton($this->l10n->t('Open »%s«', [$fileName]), $link);
$emailTemplate->addBodyButton($this->l10n->t('Open »%s«', [htmlspecialchars($fileName)]), $link);
return $emailTemplate;
}