fast_sanitize v0.2.3 FastSanitize
Fast HTML sanitization module.
Link to this section Summary
Functions
Strip tags from a given document fragment that are not basic HTML.
Strip all tags from a given document fragment.
Link to this section Functions
Link to this function
basic_html(doc)
Strip tags from a given document fragment that are not basic HTML.
Example
iex> FastSanitize.basic_html("<h1>hello world</h1><script>alert('xss')</script>")
{:ok, "<h1>hello world</h1>alert('xss')"}
Link to this function
strip_tags(doc)
Strip all tags from a given document fragment.
Example
iex> FastSanitize.strip_tags("<h1>hello world</h1>")
{:ok, "hello world"}