allow using only text content

This commit is contained in:
Andris Reinman 2017-01-29 18:33:40 +02:00
parent 441b121b99
commit fa5d2d012d

View file

@ -104,7 +104,7 @@ router.get('/:campaign/:list/:subscription', passport.csrfProtection, (req, res,
renderAndShow(body && body.toString(), false);
});
} else {
renderAndShow(campaign.html, true);
renderAndShow(campaign.html || (campaign.text || '').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/\n/g,'<br />'), true);
}
});
});