Ghost/ghost/email-service/test
Simon Backx 3db434736b
🐛 Fixed replacements with fallback in plaintext newsletters (#16372)
fixes https://github.com/TryGhost/Team/issues/2683

When sending a newsletter with a replacement that has a fallback, the
replacement only happens in the HTML version of the newsletter. The
plaintext version isn't replaced.

This commit fixes the issue and adds some tests to make sure it doesn't
happen again.

The cause of the issue was that we used the original matched Regex text
to replace. But that was calculated on the HTML version, so double
quotes were encoded. This change updates the generated 'token' regex to
also match on both a double quote as the escaped double quote.
2023-03-07 15:34:43 +01:00
..
utils Added 100% test coverage to email renderer and fixed authors bug 2023-01-11 12:14:02 +01:00
.eslintrc.js Added email service package (#15849) 2022-11-21 10:29:53 +01:00
batch-sending-service.test.js Implemented retrying for sending email via Mailgun API 2023-02-21 16:06:23 +01:00
email-controller.test.js 🎨 Add ability to send test email with chosen newsletter (#15783) 2023-01-09 17:48:30 +04:00
email-event-processor.test.js Moved email event fetching to main thread (#16231) 2023-02-09 09:36:39 +01:00
email-event-storage.test.js 🐛 Fixed storing email failures with an empty message (#16260) 2023-02-13 15:25:36 +01:00
email-renderer.test.js 🐛 Fixed replacements with fallback in plaintext newsletters (#16372) 2023-03-07 15:34:43 +01:00
email-segmenter.test.js Updated unit test coverage for email service (#15913) 2022-12-02 00:33:28 +05:30
email-service.test.js 🐛 Fixed not reactivating email analytics jobs 2023-01-26 17:35:45 +01:00
mailgun-email-provider.test.js Restricted email-service package to 100% test coverage 2023-01-11 13:54:26 +01:00
sending-service.test.js 🐛 Fixed email replacements without fallback 2023-02-13 15:58:40 +01:00