diff --git a/package-lock.json b/package-lock.json index 771042e707..d0afe5e077 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20083,7 +20083,7 @@ "version": "2.10.2", "license": "MIT", "dependencies": { - "linkifyjs": "^4.1.0" + "linkifyjs": "^4.2.0" }, "devDependencies": { "@tiptap/core": "^2.10.2", diff --git a/packages/extension-link/package.json b/packages/extension-link/package.json index 24c5465e6d..ebf0c5eddf 100644 --- a/packages/extension-link/package.json +++ b/packages/extension-link/package.json @@ -29,7 +29,7 @@ "dist" ], "dependencies": { - "linkifyjs": "^4.1.0" + "linkifyjs": "^4.2.0" }, "devDependencies": { "@tiptap/core": "^2.10.2", diff --git a/packages/extension-link/src/link.ts b/packages/extension-link/src/link.ts index bb8ead872a..b9b882995b 100644 --- a/packages/extension-link/src/link.ts +++ b/packages/extension-link/src/link.ts @@ -351,12 +351,7 @@ export const Link = Mark.create({ if (text) { const { protocols, defaultProtocol } = this.options - // Prosemirror replaces zero-width non-joiner characters - // with Object Replacement Character from unicode. - // Therefore, linkifyjs does not recognize the - // link properly. We replace these characters - // with regular spaces to fix this issue. - const links = find(text.replaceAll('\uFFFC', ' ')).filter( + const links = find(text).filter( item => item.isLink && this.options.isAllowedUri(item.value, { defaultValidate: href => !!isAllowedUri(href, protocols),