Fix Error Invalid Group Specifier Name on Safari by removing REGEX lookbehind group construct (fixes #239)

This commit is contained in:
schlagmichdoch 2024-01-12 01:23:14 +01:00
parent 041261be2a
commit 2e15a018da
2 changed files with 19 additions and 3 deletions

View file

@ -583,4 +583,14 @@ async function decodeBase64Text(base64) {
if (!base64) throw new Error('Base64 is empty');
return decodeURIComponent(escape(window.atob(base64)))
}
function isUrlValid(url) {
try {
let urlObj = new URL(url);
return true;
}
catch (e) {
return false;
}
}