HTML Escaping In Rust
```cargo
-escape = "0.2.13"
```
use *;
html
Output:
encode_safe: _ < _ > _ " _ ' _ / _ & _
encode_text: _ < _ > _ " _ ' _ / _ & _
encode_quoted_attribute: _ < _ > _ " _ ' _ / _ & _
encode_double_quoted_attribute: _ < _ > _ " _ ' _ / _ & _
encode_single_quoted_attribute: _ < _ > _ " _ ' _ / _ & _
Full Escape
```cargo
-escape = "0.2.13"
```
use *;
html
Output:
encode_unquoted_attribute: _ < _ > _ " _ ' _ / _ & _
Notes
- This is what I'm using in Neopoligen in additon to minijinja for the individual things like inline code tokens
-
There's also
escape_script
andescape_style
which deals with script and style tags. That's not what I'm interested in here.
-- end of line --