Function escape_href
Source pub fn escape_href(output: &mut String, href: &str)
Expand description
Escape special characters in URLs
§Arguments
output
- The string buffer to write to
href
- The URL to escape
§Example
let mut output = String::new();
pulldown_html_ext::utils::escape_href(&mut output, "https://example.com/path with spaces");
assert!(output.contains("%20"));