# `HtmlSanitizeEx.Scrubber.NoScrub`
[🔗](https://github.com/rrrene/html_sanitize_ex/blob/main/lib/html_sanitize_ex/scrubber/no_scrub.ex#L1)

Scrubs neither tags, nor their attributes.

This meant for testing purposes and as a template for your own scrubber.

# `before_scrub`

Can be used to preprocess the given +html+ String before it is scrubbed.

# `sanitize`

Scrubs neither tags, nor their attributes.

# `scrub`

Scrubs its argument. Possible arguments are the following.
* A single tag given its attributes and children: `{tag, attributes, children}`.
  In this case calls `scrub_attribute/2` to scrub individual attributes.
* Tokens like comments and doctypes: `{_token, children}`.
* A text node.

# `scrub_attribute`

Scrubs a single attribute for a given tag.

You can utilize scrub_attribute to write custom matchers so you can sanitize
specific attributes of specific tags:

As an example, if you only want to allow href attribute with the "http" and
"https" protocols, you could implement it like this:

    def scrub_attribute("a", {"href", "http" <> target}) do
      {"href", "http" <> target}
    end

    def scrub_attribute("a", {"href", _}) do
      nil
    end

---

*Consult [api-reference.md](api-reference.md) for complete listing*
