unescape_html
Decodes the HTML entities &, <, >, ", ', ' and any numeric
character reference (A, A).
It is the inverse of escape_html. The text is decoded in a single
pass, so &lt; becomes < and not <. Anything that is not a known entity, including
a numeric reference that is not a valid character, is left as it is. Returns the input
borrowed, without allocating, when it contains no &.
Import
Section titled “Import”Cargo feature string (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
s | &str | The text to decode. |
Returns
Section titled “Returns”Cow<'_, str>
