quick_xml::escape

Function escape

Source
pub fn escape<'a>(raw: impl Into<Cow<'a, str>>) -> Cow<'a, str>
Expand description

Escapes an &str and replaces all xml special characters (<, >, &, ', ") with their corresponding xml escaped value.

This function performs following replacements:

CharacterReplacement
<&lt;
>&gt;
&&amp;
'&apos;
"&quot;

This function performs following replacements:

CharacterReplacement
<&lt;
>&gt;
&&amp;
'&apos;
"&quot;