Kantoor.Webmail.HtmlScrubber (Kantoor v1.0.0)

Allow-list scrubber for hostile HTML mail (see Kantoor.Webmail.HtmlSanitizer).

Only formatting tags and a handful of harmless attributes survive. There is no style attribute or tag, no class/id, no forms, media, frames, SVG or scripts, and no event handlers. Links may only be http, https or mailto. Images are allowed only with a data: source (inlined cid: images); the remote-capable variant is Kantoor.Webmail.HtmlScrubberRemote.

Summary

Functions

before_scrub(arg)

Callback implementation for HtmlSanitizeEx.Scrubber.before_scrub/1.

sanitize(html)

scrub(arg)

Callback implementation for HtmlSanitizeEx.Scrubber.scrub/1.

scrub_attribute(arg1, arg2)

Callback implementation for HtmlSanitizeEx.Scrubber.scrub_attribute/2.

scrub_attributes(tag, attributes)

Callback implementation for HtmlSanitizeEx.Scrubber.scrub_attributes/2.