From 722acf5986bda0ddea3a4724d171e4d553037bbf Mon Sep 17 00:00:00 2001 From: かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 14 Jul 2024 17:28:34 +0900 Subject: fix(frontend): follow-up of #13089 (#14206) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(frontend): #13089 を修正 * fix * 正規表現を強化 * fix --- packages/frontend/src/scripts/url.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/frontend/src/scripts/url.ts') diff --git a/packages/frontend/src/scripts/url.ts b/packages/frontend/src/scripts/url.ts index c477fb5506..5a8265af9e 100644 --- a/packages/frontend/src/scripts/url.ts +++ b/packages/frontend/src/scripts/url.ts @@ -23,6 +23,6 @@ export function appendQuery(url: string, query: string): string { } export function extractDomain(url: string) { - const match = url.match(/^(https)?:?\/{0,2}([^\/]+)/); - return match ? match[2] : null; + const match = url.match(/^(?:https?:)?(?:\/\/)?(?:[^@\n]+@)?([^:\/\n]+)/im); + return match ? match[1] : null; } -- cgit v1.2.3-freya