Update URL regex to support URLs with parentheses

This commit is contained in:
Foxster
2024-01-02 18:38:35 -08:00
parent ea71ed7606
commit 129c5c7072

View File

@@ -11,7 +11,7 @@ export const urlSearchParams = new URLSearchParams(window.location.search);
export const sourceURL = urlSearchParams.get('source')?.replaceAll("+", "%2B"); export const sourceURL = urlSearchParams.get('source')?.replaceAll("+", "%2B");
// https://stackoverflow.com/a/8943487 // 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 = [ export const sources = [
"https://therealfoxster.github.io/altsource/apps.json", "https://therealfoxster.github.io/altsource/apps.json",