diff --git a/src/utils/mod.rs b/src/utils/mod.rs index e40bd46..54a8d93 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1,5 +1,11 @@ pub mod inbound_generator; +pub fn url_decode_str(value: &str) -> Option { + return urlencoding::decode(value) + .ok() + .map(|decoded| decoded.into_owned()); +} + pub fn url_decode(value: Option) -> Option { return value.and_then(|s| { urlencoding::decode(&s)