This library is for encoding/escaping special characters in HTML and decoding/unescaping HTML entities as well.
This crate provides some encode_* functions to encode HTML text in different situations.
For example, to put a text between a start tag <foo> and an end tag </foo>, use the encode_text function to escape every &, <, and > in the text.
```rust extern crate html_escape;
asserteq!("a > b && a < c", htmlescape::encode_text("a > b && a < c")); ```
The functions suffixed with _to_writer, _to_vec or _to_string are useful to generate HTML.
```rust extern crate html_escape;
let mut html = String::from("", &mut html)); html.push_str("');");
assert_eq!("", html); ```
```rust extern crate html_escape;
asserteq!("Hello world!", htmlescape::decodehtmlentities("Hello world!")); ```
```rust extern crate html_escape;
asserteq!("alert(');'", htmlescape::decode_script(r"alert('