# htmlentity
html entity encode and decode.
[](https://docs.rs/htmlentity/badge.svg)
[](https://travis-ci.com/github/fefit/htmlentity)
[](https://codecov.io/gh/fefit/htmlentity)
## How to use
```rust
use htmlentity::entity::*;
let html = "<div class='header'></div>";
let html_encoded: Vec<char> = encode(html, Entities::SpecialChars, EncodeType::Named);
assert_eq!(html_encoded.iter().collect::<String>(), "<div class='header'></div>");
let html_decoded: Vec<char> = decode_chars(&html_encoded);
assert_eq!(html, html_decoded.iter().collect::<String>());
```
For more details, please see the document in [Docs.rs](https://docs.rs/htmlentity)
## License
[MIT License](./LICENSE).