Skip to main content

escape

Function escape 

Source
pub fn escape(text: &str) -> String
Expand description

Escape text for HTML: the only escaping a generated page needs, applied at every interpolation rather than hoped for.

use majordomus_cli::web::report::html::escape;
assert_eq!(escape("a<b & c\">"), "a&lt;b &amp; c&quot;&gt;");