From 59baf97e51528ad80e4045a439922f73cc5df90e Mon Sep 17 00:00:00 2001 From: Zhiwei Li <65117011+Levix@users.noreply.github.com> Date: Mon, 19 Jan 2026 00:36:38 +0800 Subject: [PATCH] fix: allow additional URL schemes in parse_command function (#125) * fix: allow additional URL schemes in parse_command function * fix: enhance URL validation in parse_command function to support lowercase schemes --- cli/src/commands.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/src/commands.rs b/cli/src/commands.rs index 3595183..ef0c1bf 100644 --- a/cli/src/commands.rs +++ b/cli/src/commands.rs @@ -75,7 +75,12 @@ pub fn parse_command(args: &[String], flags: &Flags) -> Result", })?; - let url = if url.starts_with("http") { + let url_lower = url.to_lowercase(); + let url = if url_lower.starts_with("http://") + || url_lower.starts_with("https://") + || url_lower.starts_with("about:") + || url_lower.starts_with("data:") + || url_lower.starts_with("file:") { url.to_string() } else { format!("https://{}", url)