pub fn sanitize_url( resource: &str, allow_double_slashes: bool, ) -> Result<String>
Sanitizes the URL