From d857be69486bc4e448ae51aaf6bc224c237b17c4 Mon Sep 17 00:00:00 2001 From: RoyceDa Date: Tue, 17 Feb 2026 12:04:53 +0200 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BF=D0=BE=D0=B4?= =?UTF-8?q?=D1=81=D0=B2=D0=B5=D1=82=D0=BA=D0=B8=20=D1=81=D1=81=D1=8B=D0=BB?= =?UTF-8?q?=D0=BE=D0=BA=20=D1=81=20=D1=82=D0=BE=D1=87=D0=BA=D0=B0=D0=BC?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/TextParser/TextParser.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/components/TextParser/TextParser.tsx b/app/components/TextParser/TextParser.tsx index 0573144..9cbdf4c 100644 --- a/app/components/TextParser/TextParser.tsx +++ b/app/components/TextParser/TextParser.tsx @@ -46,10 +46,11 @@ export function TextParser(props: TextParserProps) { { pattern: [ /(https?:\/\/[^\s]+)/g, - /\b(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:\/[^\s]*)?/g + /\b(?:https?:\/\/)?(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(?:\/[\w\-\.\/\?&#=%]*)?/g ], render: (match: string) => { - let domainZone = match.split('.').pop() || ''; + let domain = match.replace(/https?:\/\//, '').split('/')[0]; + let domainZone = domain.split('.').pop() || ''; domainZone = domainZone.split('/')[0]; if(!ALLOWED_DOMAINS_ZONES.includes(domainZone)) { return <>{match};