diff --git a/src/util/strings.cjs b/src/util/strings.cjs
index 9933cc6e3866c476b47342a29ddb206eb90fa4a5..2965c4f2808bf94af9ef3e2ec889e5552e30e6ae 100644
--- a/src/util/strings.cjs
+++ b/src/util/strings.cjs
@@ -38,13 +38,16 @@ function toTitleCase(str) {
     });
 }
 function isValidURL(url) {
-    try {
-        new URL(url);
-        return true;
-    }
-    catch {
-        return false;
+    if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith('ftp://')) {
+        try {
+            new URL(url);
+            return true;
+        }
+        catch {
+            return false;
+        }
     }
+    return false;
 }
 function isValidJson(str) {
     try {
diff --git a/src/util/strings.js b/src/util/strings.js
index f5c1655512099b880fc5022e95d5e0c4d1d073f2..1a64bd662a22efd2effd9d2846ffcf0b93391963 100644
--- a/src/util/strings.js
+++ b/src/util/strings.js
@@ -29,13 +29,16 @@ export function toTitleCase(str) {
     });
 }
 export function isValidURL(url) {
-    try {
-        new URL(url);
-        return true;
-    }
-    catch {
-        return false;
+    if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith('ftp://')) {
+        try {
+            new URL(url);
+            return true;
+        }
+        catch {
+            return false;
+        }
     }
+    return false;
 }
 export function isValidJson(str) {
     try {
