decode_html_ignoring_errors

Function decode_html_ignoring_errors 

Source
pub fn decode_html_ignoring_errors(s: &str) -> Result<String, DecodeErr>
Expand description

Decodes an entity-encoded string.

Decodes an entity encoded string, replacing HTML entities (&amp;, &#20; …) with the the corresponding character. Case matters for named entities, ie. &Amp; is invalid. Case does not matter for hex entities, so &#x2E; and &#x2e; are treated the same.

§Arguments

  • s - Entity-encoded string to decode.

§Failure

Any invalid, unrecognised or malformed entities will be ignored and left intact.

This function will never return errors with kind set to IoError or EncodingError.