« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/validators.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/validators.js')
-rw-r--r--src/validators.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/validators.js b/src/validators.js
index 1c9ce9e3..73fcf7bc 100644
--- a/src/validators.js
+++ b/src/validators.js
@@ -710,7 +710,11 @@ export function isName(name) {
 export function isURL(string) {
   isStringNonEmpty(string);
 
-  new URL(string);
+  // This might error.
+  const url = new URL(string);
+
+  // This might, too.
+  decodeURIComponent(url.pathname);
 
   return true;
 }