0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

🐛 Fixed "from" parameter handling for bulk email

closes https://github.com/TryGhost/Ghost/issues/11768

- Wraps from parameter in double quotes so mail clients can read it whole
- Escapes double quotes in site title to avoid clash with wrapping
This commit is contained in:
Rish 2020-06-08 21:56:11 +05:30
parent d541a14826
commit bbcd32d204

View file

@ -71,8 +71,8 @@ module.exports = {
BATCH_SIZE = 2;
}
const blogTitle = settingsCache.get('title');
fromAddress = blogTitle ? `${blogTitle}<${fromAddress}>` : fromAddress;
const blogTitle = settingsCache.get('title') ? settingsCache.get('title').replace(/"/g, '\\"') : '';
fromAddress = blogTitle ? `"${blogTitle}"<${fromAddress}>` : fromAddress;
const chunkedRecipients = _.chunk(recipients, BATCH_SIZE);