[][src]Function html_escape::encode_safe

pub fn encode_safe<S: ?Sized + AsRef<str>>(text: &S) -> Cow<str>

Encode text to prevent special characters functioning.

The following characters are escaped:

  • & => &amp;
  • < => &lt;
  • > => &gt;
  • " => &quot;
  • ' => &#x27;
  • / => &#x2F;