[][src]Function html_escape::encode_safe_to_string

pub fn encode_safe_to_string<S: AsRef<str>>(
    text: S,
    output: &mut String
) -> &str

Encode text to prevent special characters functioning and write it to a mutable String reference and return the encoded string slice.

The following characters are escaped:

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