From 129c5c70726d1b4206b5d8838ed1932c98778a98 Mon Sep 17 00:00:00 2001 From: Foxster Date: Tue, 2 Jan 2024 18:38:35 -0800 Subject: [PATCH] Update URL regex to support URLs with parentheses --- common/modules/constants.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/modules/constants.js b/common/modules/constants.js index d66481a..5ba3e58 100644 --- a/common/modules/constants.js +++ b/common/modules/constants.js @@ -11,7 +11,7 @@ export const urlSearchParams = new URLSearchParams(window.location.search); export const sourceURL = urlSearchParams.get('source')?.replaceAll("+", "%2B"); // https://stackoverflow.com/a/8943487 -export const urlRegex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; +export const urlRegex = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;()]*[-A-Z0-9+&@#\/%=~_|)])/ig; export const sources = [ "https://therealfoxster.github.io/altsource/apps.json",