From bbcd32d2047b5235c0446cacc4d6666b146413e5 Mon Sep 17 00:00:00 2001 From: Rish Date: Mon, 8 Jun 2020 21:56:11 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20"from"=20parameter=20han?= =?UTF-8?q?dling=20for=20bulk=20email?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- core/server/services/bulk-email/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/services/bulk-email/index.js b/core/server/services/bulk-email/index.js index 1d58444b73..023affb001 100644 --- a/core/server/services/bulk-email/index.js +++ b/core/server/services/bulk-email/index.js @@ -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);