diff --git a/scripts/utils.ts b/scripts/utils.ts index d58b80406d..ecce8da58b 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -2,8 +2,8 @@ import normalizeUrl from 'normalize-url' export function isURI(string: string): boolean { try { - new URL(string) - return true + const url = new URL(string) + return /^(http:|https:|mmsh:|rtsp:|rtmp:)/.test(url.protocol) } catch { return false }