Ghost/ghost/email-service/test
Chris Raible 64c9e66b56
🐛 Fixed broken link tracking in newsletters (#16473)
refs https://github.com/TryGhost/Team/issues/2805

When we render mobiledoc to HTML, it automatically escapes HTML entities in the process, so a button or directly pasted link with href="https://example.com?code=test" will be rendered as href="https://example.com?code&#x3Dtest" as the url is encoded in the rendered HTML. Our link tracking was using the encoded URL as the redirect URL in newsletters, causing certain links to break.

This change updates the link tracking to decode the URL with `entities.decode(url)` so we store the correct redirect URL in our DB and ensure link tracking redirects to the correct url from newsletters.

---------

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2023-03-24 18:44:55 +05:30
..
utils Added subscription status text in newsletters (#16442) 2023-03-22 11:52:41 +01:00
.eslintrc.js Added email service package (#15849) 2022-11-21 10:29:53 +01:00
batch-sending-service.test.js Added subscription status text in newsletters (#16442) 2023-03-22 11:52:41 +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 broken link tracking in newsletters (#16473) 2023-03-24 18:44:55 +05:30
email-segmenter.test.js Updated unit test coverage for email service (#15913) 2022-12-02 00:33:28 +05:30
email-service.test.js Added subscription status text in newsletters (#16442) 2023-03-22 11:52:41 +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