Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/dominikmifkovic/detoxss is gone (deleted or private); Software Heritage has not archived the repo; no fork with the same repo name found; no cached copy. Use another version.
Sanitization helpers for plain text, attributes, and limited HTML.
Use sanitizeText when the whole input should be displayed as text.
Use sanitizeWithWhitelist when a small set of HTML tags and attributes should
be preserved according to a whitelist configuration.
The sanitizer is designed as a practical safety layer. It should be used
together with context-aware output handling and, when needed, with the AST
analyzer from DetoXSS.Ast.
Sanitize HTML-like input using a whitelist state.
When whitelist mode is enabled, only allowed tags and attributes are preserved. When whitelist mode is disabled, the whole input is escaped as text.
sanitizeWithWhitelist whitelistState "<p>Hello</p>"Sanitize a value intended for an attribute-like context.
This removes control characters, collapses whitespace, and wraps the result as validated input. It does not make arbitrary attribute usage safe in every possible context.
Escape HTML-sensitive characters.
This converts characters such as <, >, &, ", and ' into HTML
entities so that the value can be displayed as text instead of being interpreted
as markup.
Decode a small set of common HTML entities.
This helper is used before sanitization so that already encoded input can be normalized before being escaped again.
Remove control characters from a string.
Newline, carriage return, and tab characters are preserved.
Sanitize input that should be displayed as plain text.
The whole input is treated as text. HTML tags are not preserved.