[][src]Function format_xml::escape

pub fn escape<T: Display>(value: T) -> impl Display

Escapes &<>"' with their equivalent entities.

assert_eq!(escape("&<>\"\'").to_string(), "&amp;&lt;&gt;&quot;&apos;");