Ammoniex.HTML (ammoniex v0.3.0)

Link to this section Summary

Functions

Cleans HTML using the NIF.

Link to this section Functions

Cleans HTML using the NIF.

When given a string will sanitze any HTML tags and return the result. When given anything else will return an empty string.

examples

Examples

iex> Ammoniex.HTML.clean("<p>hello</p><script>alert('hello')</script>")
"<p>hello</p>"

iex> Ammoniex.HTML.clean(%{})
""