Ghost/ghost/core
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
..
content 🎨 Updated Casper to v5.4.7 2023-03-03 16:00:37 +00:00
core 🐛 Fixed replacements with fallback in plaintext newsletters (#16372) 2023-03-07 15:34:43 +01:00
test 🐛 Fixed replacements with fallback in plaintext newsletters (#16372) 2023-03-07 15:34:43 +01:00
.c8rc.e2e.json
.c8rc.json Reduced code coverage limits temporarily 2023-02-27 17:37:48 +01:00
.eslintignore
.eslintrc.js
.npmignore
config.development.json
ghost.js
index.js
jsconfig.json
loggingrc.js
MigratorConfig.js
package.json Downgraded expect and @playwright/test packages 2023-03-07 12:11:05 +01:00
playwright.config.js Increased global Playwright expect timeout to 10s 2023-02-22 12:54:26 +01:00