Ghost/ghost/link-replacer
Rishabh Garg 2e2b3c7c0f
Fixed LinkReplacer bug causing broken links on published post/page (#16514)
refs TryGhost/Team#2840

- moves the `entities.decode()` step to the `LinkReplacer` class so that
it's applied to all links, not just the ones that are replaced in the
email service
- adds a test case to `LinkReplacer` to ensure that the
`entities.decode()` step is applied to all links correctly, decoding any
URLs with HTML entities in them

---------

Co-authored-by: Chris Raible <chris@ghost.org>
2023-03-28 15:59:15 +05:30
..
lib Fixed LinkReplacer bug causing broken links on published post/page (#16514) 2023-03-28 15:59:15 +05:30
test Fixed LinkReplacer bug causing broken links on published post/page (#16514) 2023-03-28 15:59:15 +05:30
.eslintrc.js
index.js
package.json Fixed LinkReplacer bug causing broken links on published post/page (#16514) 2023-03-28 15:59:15 +05:30
README.md

Link Replacement

Replace links in a HTML string to add attribution and link tracking

Usage

Develop

This is a monorepo package.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Test

  • yarn lint run just eslint
  • yarn test run lint and tests