From 27308950cffc9cb2fcf53f670e40e6f9e30d2d02 Mon Sep 17 00:00:00 2001 From: Yeison Daza Date: Wed, 29 Nov 2023 14:35:31 -0500 Subject: [PATCH] URL sanitization ClickableLinkPlugin (#5302) --- packages/lexical-react/src/LexicalClickableLinkPlugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/lexical-react/src/LexicalClickableLinkPlugin.tsx b/packages/lexical-react/src/LexicalClickableLinkPlugin.tsx index 2a4386a9618..a79cb4de4c0 100644 --- a/packages/lexical-react/src/LexicalClickableLinkPlugin.tsx +++ b/packages/lexical-react/src/LexicalClickableLinkPlugin.tsx @@ -61,7 +61,7 @@ export default function LexicalClickableLinkPlugin({ $isElementNode, ); if ($isLinkNode(maybeLinkNode)) { - url = maybeLinkNode.getURL(); + url = maybeLinkNode.sanitizeUrl(maybeLinkNode.getURL()); urlTarget = maybeLinkNode.getTarget(); } else { const a = findMatchingDOM(target, isHTMLAnchorElement);