From e08b9b01888ee63b2800101ee7d902250c1385b9 Mon Sep 17 00:00:00 2001 From: SethBurkart123 Date: Fri, 9 Feb 2024 16:38:04 +1100 Subject: [PATCH] fix: shortcuts with https://website/something in their url are marked as invalid --- src/interface/pages/Shortcuts.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface/pages/Shortcuts.tsx b/src/interface/pages/Shortcuts.tsx index b81c9ab7..8e159b6b 100644 --- a/src/interface/pages/Shortcuts.tsx +++ b/src/interface/pages/Shortcuts.tsx @@ -36,7 +36,7 @@ export default function Shortcuts() { const isValidTitle = (title: string): boolean => title.trim() !== ""; const isValidURL = (url: string): boolean => { - const pattern = new RegExp("^(https?:\\/\\/)?[\\w.-]+[\\w.-]+$", "i"); + const pattern = new RegExp("^(https?:\\/\\/)?[\\w.-]+[\\w.-]+(/[\\w.-]*)*$", "i"); return pattern.test(url); };