Function quick_xml::escape::minimal_escape

source ยท
pub fn minimal_escape(raw: &str) -> Cow<'_, str>
Expand description

XML standard requires that only < and & was escaped in text content or attribute value. All other characters not necessary to be escaped, although for compatibility with SGML they also should be escaped. Practically, escaping only those characters is enough.

This function performs following replacements:

CharacterReplacement
<&lt;
&&amp;