[−][src]Macro format_xml::escape
Formats as String while escaping &<>"'
with their equivalent entities.
Accepts either an expression or a list of literals and formatting instructions.
Examples
use format_xml::escape; assert_eq!(escape!({"Friday"} "'s the " {13} "th").to_string(), "Friday's the 13th"); assert_eq!(escape!("<script>alert(" {42;#x} ")</script>").to_string(), "<script>alert(0x2a)</script>");