pub fn partial_escape<'a>(raw: impl Into<Cow<'a, str>>) -> Cow<'a, str>Expand description
Escapes an &str and replaces xml special characters (<, >, &)
with their corresponding xml escaped value.
Should only be used for escaping text content. In XML text content, it is allowed
(though not recommended) to leave the quote special characters " and ' unescaped.
This function performs following replacements:
| Character | Replacement |
|---|---|
< | < |
> | > |
& | & |
This function performs following replacements:
| Character | Replacement |
|---|---|
< | < |
> | > |
& | & |