# `Markup.Sanitize`
[🔗](https://github.com/paradox460/markup/blob/markup-v0.1.0/core/lib/markup/sanitize.ex#L1)

The ammonia sanitize option schema every language shares, plus the helpers
that escape braces for HEEx.

Pass `sanitize:` to any render function and the final HTML gets sanitized.
Your options are merged over the language's `default_sanitize_options/0`, and
`nil` turns sanitizing off. The option names follow
[ammonia's `Builder`](https://docs.rs/ammonia/latest/ammonia/struct.Builder.html);
see `schema/0`.

# `prepare`

```elixir
@spec prepare(keyword() | nil) :: keyword() | nil
```

Resolves option combinations that ammonia rejects. A tag listed in
`allowed_classes`/`add_allowed_classes` loses `class` from its
`tag_attributes`/`add_tag_attributes`, so the class allowlist alone decides
which classes it keeps. Languages call this on
`Markup.Document.get_option(doc, :sanitize)` before they sanitize.

# `schema`

```elixir
@spec schema() :: keyword()
```

The sanitize option schema. The languages supply the defaults.

---

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