encode_text

Function encode_text 

pub fn encode_text<S>(text: &S) -> Cow<'_, str>
where S: AsRef<str> + ?Sized,
Expand description

Encode text used as regular HTML text.

The following characters are escaped:

  • & => &amp;
  • < => &lt;
  • > => &gt;