Open Awlexus opened 1 year ago
I need a similar scrubber as the ones seen in the documentation, but when I try to create and scrub some text it also scrubs the pattern I allowed.
# custom scrubber defmodule LinksOnlyScrubber do require HtmlSanitizeEx.Scrubber.Meta alias HtmlSanitizeEx.Scrubber.Meta Meta.remove_cdata_sections_before_scrub() Meta.strip_comments() Meta.allow_tag_with_uri_attributes("a", ["href"], ["https", "mailto", "http"]) Meta.strip_everything_not_covered() end
The tag has been removed
iex> HtmlSanitizeEx.Scrubber.scrub "This is a <a href=\"https://www.youtube.com/\">test</a>", LinksOnlyScrubber "This is a test"
The text should be left untouched
html_sanitize_ex 1.4.2 mochiweb 2.22.0
I need a similar scrubber as the ones seen in the documentation, but when I try to create and scrub some text it also scrubs the pattern I allowed.
Actual result
The tag has been removed
Expected result
The text should be left untouched
Versions
html_sanitize_ex 1.4.2 mochiweb 2.22.0