Skip to main content

escape_text

Function escape_text 

Source
pub fn escape_text(s: &str) -> String
Expand description

Escape a string for use in XML text content (&, <, >, ", ').

Uses quick_xml::escape::escape which covers all five XML special chars, producing &amp;, &lt;, &gt;, &quot;, and &apos; as needed.