diff --git a/frontend/components/ClickableUrls/ClickableUrls.tsx b/frontend/components/ClickableUrls/ClickableUrls.tsx index 6a381c1cb9..444dee0f3d 100644 --- a/frontend/components/ClickableUrls/ClickableUrls.tsx +++ b/frontend/components/ClickableUrls/ClickableUrls.tsx @@ -21,7 +21,7 @@ const ClickableUrls = ({ text, className }: IClickableUrls): JSX.Element => { // Regex to find case insensitive URLs and replace with link const replacedLinks = text.replaceAll( - /(https?)?(:\/\/)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/g, + /(((https?)?(:\/\/))|((https?)?(:\/\/)?(www\.)))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/g, urlReplacer ); const sanitizedResolutionContent = DOMPurify.sanitize(replacedLinks, {