HtmlSanitizeEx.Scrubber behaviour (html_sanitize_ex v1.5.0)

View Source

Summary

Types

node_with_children()

@type node_with_children() ::
  {tag :: String.t(), attributes :: Keyword.t(), children :: list()}

Callbacks

before_scrub(html)

@callback before_scrub(html :: String.t()) :: String.t()

scrub(node_with_children)

@callback scrub(node_with_children()) :: node_with_children()
@callback scrub({token :: atom(), children :: list()}) :: tuple()
@callback scrub(text :: String.t()) :: String.t()

scrub_attribute(tag, attribute)

@callback scrub_attribute(tag :: String.t(), attribute :: String.t()) :: tuple() | nil

scrub_attributes(tag, attributes)

@callback scrub_attributes(tag :: String.t(), attributes :: Keyword.t()) :: Keyword.t()

Functions

scrub(html, scrubber_module)