HtmlSanitizeEx.Parser (html_sanitize_ex v1.4.3) View Source

Link to this section Summary

Functions

Parses a HTML string.

Link to this section Types

Specs

html_tree() :: tuple() | list()

Link to this section Functions

Specs

parse(binary()) :: html_tree()

Parses a HTML string.

Examples

iex> HtmlSanitizeEx.Parser.parse("<div class=js-action>hello world</div>")
{"div", [{"class", "js-action"}], ["hello world"]}

iex> HtmlSanitizeEx.Parser.parse("<div>first</div><div>second</div>")
[{"div", [], ["first"]}, {"div", [], ["second"]}]