diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua index fe055b4d1c..613f5a3286 100644 --- a/player/lua/ytdl_hook.lua +++ b/player/lua/ytdl_hook.lua @@ -153,7 +153,7 @@ local function edl_escape(url) end local function url_is_safe(url) - local proto = type(url) == "string" and url:match("^(.+)://") or nil + local proto = type(url) == "string" and url:match("^(%a[%w+.-]*):") or nil local safe = proto and safe_protos[proto] if not safe then msg.error(("Ignoring potentially unsafe url: '%s'"):format(url))