HtmlSanitizeEx (html_sanitize_ex v1.5.0)
View SourceHtmlSanitizeEx can be used to implement custom scrubbers, from scratch or by extending an existing scrubber.
defmodule MyScrubber do
use HtmlSanitizeEx, extend: :basic_html
allow_tag_with_any_attributes("p")
endYou can extend :basic_html, :html5, :markdown_html and :strip_tags.
You can also extend any custom scrubber you created:
defmodule FooBarScrubber do
use HtmlSanitizeEx, extend: MyScrubber
allow_tag_with_any_attributes("header")
end