From 65994107685e82c34bb904f2e1d5af845014df88 Mon Sep 17 00:00:00 2001 From: mykola2312 Date: Sat, 30 Mar 2024 06:50:27 +0200 Subject: [PATCH] we arent going to download from ftp lol --- src/bot/sanitize.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bot/sanitize.rs b/src/bot/sanitize.rs index ecab59a..a9b264a 100644 --- a/src/bot/sanitize.rs +++ b/src/bot/sanitize.rs @@ -3,7 +3,7 @@ use url::Url; // https://stackoverflow.com/questions/6038061/regular-expression-to-find-urls-within-a-string const RE_URL: &str = - r"(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])"; + r"(http|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])"; pub fn extract_url(text: &str) -> Option<&str> { let re = Regex::new(RE_URL).unwrap();