Function escape

fn escape(output: &mut dyn Write, buffer: &[u8]) -> io::Result<()>

Writes buffer to output, escaping anything that could be interpreted as an HTML tag.

Namely:

Note that this is appropriate and sufficient for free text, but not for URLs in attributes. See escape_href.