Skip to main content

safe_href

Function safe_href 

Source
pub fn safe_href(link: &str) -> Option<&str>
Expand description

A link fit for an href: a site path (/about, not //host), a fragment, or an http(s), mailto or tel address. Anything else (javascript:, data:, a bare word) is None.