Skip to content

Bump html_sanitize_ex from 1.4.4 to 1.5.0#193

Merged
nelsonic merged 1 commit intomainfrom
dependabot/hex/html_sanitize_ex-1.5.0
Apr 3, 2026
Merged

Bump html_sanitize_ex from 1.4.4 to 1.5.0#193
nelsonic merged 1 commit intomainfrom
dependabot/hex/html_sanitize_ex-1.5.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot bot commented on behalf of github Apr 1, 2026

Bumps html_sanitize_ex from 1.4.4 to 1.5.0.

Release notes

Sourced from html_sanitize_ex's releases.

1.5.0

Check it out on Hex: https://hex.pm/packages/html_sanitize_ex/1.5.0

New API for Custom Scrubbers

Instead of importing and requiring HtmlSanitizeEx.Scrubber.Meta, just use HtmlSanitizeEx:

defmodule MyScrubber do
  use HtmlSanitizeEx
allow_tag_with_these_attributes("p", ["title"])
end

Using HtmlSanitizeEx also creates a sanitize/1 function in the module, so you can just call MyScrubber.sanitize(html).

allow_tag_with_these_attributes/3 is taking a do block, which allows specific handling of attribute/value pairs:

defmodule MyScrubber do
  use HtmlSanitizeEx
allow_tag_with_these_attributes("p", ["title"]) do
{"class", value} when value in ["red", "green", "blue"] ->
{"class", value}
end
end

The handler either returns a {attribute, value} pair or nil to scrub the value.

Extending existing Scrubbers

HtmlSanitizeEx can also be used for extending existing scrubbers:

defmodule MyScrubber do
  use HtmlSanitizeEx, extend: :basic_html
allow_tag_with_these_attributes("p", ["title"])
end

You can extend :basic_html, :html5, :markdown_html and :strip_tags.

You can also extend any custom scrubber you created:

... (truncated)

Changelog

Sourced from html_sanitize_ex's changelog.

1.5.0

New API for Custom Scrubbers

Instead of importing and requiring HtmlSanitizeEx.Scrubber.Meta, just use HtmlSanitizeEx:

defmodule MyScrubber do
  use HtmlSanitizeEx
allow_tag_with_these_attributes("p", ["title"])
end

Using HtmlSanitizeEx also creates a sanitize/1 function in the module, so you can just call MyScrubber.sanitize(html).

allow_tag_with_these_attributes/3 is taking a do block, which allows specific handling of attribute/value pairs:

defmodule MyScrubber do
  use HtmlSanitizeEx
allow_tag_with_these_attributes("p", ["title"]) do
{"class", value} when value in ["red", "green", "blue"] ->
{"class", value}
end
end

The handler either returns a {attribute, value} pair or nil to scrub the value.

Extending existing Scrubbers

HtmlSanitizeEx can also be used for extending existing scrubbers:

defmodule MyScrubber do
  use HtmlSanitizeEx, extend: :basic_html
allow_tag_with_these_attributes("p", ["title"])
end

You can extend :basic_html, :html5, :markdown_html and :strip_tags.

You can also extend any custom scrubber you created:

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [html_sanitize_ex](https://github.com/rrrene/html_sanitize_ex) from 1.4.4 to 1.5.0.
- [Release notes](https://github.com/rrrene/html_sanitize_ex/releases)
- [Changelog](https://github.com/rrrene/html_sanitize_ex/blob/master/CHANGELOG.md)
- [Commits](rrrene/html_sanitize_ex@v1.4.4...v1.5.0)

---
updated-dependencies:
- dependency-name: html_sanitize_ex
  dependency-version: 1.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file elixir Pull requests that update elixir code labels Apr 1, 2026
Copy link
Copy Markdown
Member

@nelsonic nelsonic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dependabot 👌

@nelsonic nelsonic merged commit 89b98e7 into main Apr 3, 2026
1 check passed
@nelsonic nelsonic deleted the dependabot/hex/html_sanitize_ex-1.5.0 branch April 3, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file elixir Pull requests that update elixir code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant