# `Otera.HTML`
[🔗](https://github.com/georgeguimaraes/otera/blob/v0.1.0/lib/otera/html.ex#L1)

HTML text like Python: `escape/1` of markupsafe, `unescape/1` of `html.unescape`, and `striptags/1` of `Markup.striptags`.

The character references come from `priv/html_entities.json`, which `scripts/generate_html_entities.py` writes from the HTML5 table of Python.

# `escape`

```elixir
@spec escape(String.t()) :: String.t()
```

Escapes `&`, `<`, `>`, `'` and `"`, like `markupsafe.escape`.

# `striptags`

```elixir
@spec striptags(String.t()) :: String.t()
```

Removes the tags and comments of `text`, joins the whitespace into single spaces, and unescapes the references, like `Markup.striptags` of markupsafe.

# `unescape`

```elixir
@spec unescape(String.t()) :: String.t()
```

Replaces the named and numeric character references, like `html.unescape`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
