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.
Shared types and helpers used by the DetoXSS package.
This module defines lightweight wrappers for raw, validated, and sanitized content. The wrappers make the intended state of a value visible in type signatures.
The module also provides convenience aliases and helpers for whitelist state management.
Sanitized HTML-like content.
This alias is used for values that are intended to be safe to pass through the DetoXSS API after sanitization.
Validated input value.
This alias is used for values that passed validation rules, for example form input validation.
Raw input value.
This alias is used for values that have not yet been validated or sanitized.
Phantom marker for sanitized content.
Values marked with this state are intended to represent content that has already gone through a sanitization step.
Phantom marker for validated content.
Values marked with this state are intended to represent content that has passed a validation step.
Phantom marker for raw content.
Raw content should be treated as untrusted until it is validated, sanitized, or otherwise processed according to its output context.
Wrap a string as raw input.
This function does not validate or sanitize the value. It only marks the value as raw at the type level.
Wrap a string as validated input.
This function does not perform validation by itself. It should be used only after the caller has already validated the value.
Wrap a string as sanitized content.
This function does not sanitize the value by itself. It should be used only after the caller has already sanitized the value.
For actual sanitization, use functions from DetoXSS.Sanitize.
Extract the underlying string from a wrapped value.
Alias for the whitelist runtime state.
Default whitelist configuration.
Initial whitelist state.
The default whitelist configuration is loaded, but whitelist mode is disabled.
Enable whitelist mode.
Disable whitelist mode.
Replace the whitelist configuration.
Check whether whitelist mode is enabled.
Check whether a tag is allowed by the whitelist state.
Check whether an attribute is allowed by the whitelist state.
A string wrapped with a phantom state.
The
stateparameter is used to distinguish raw, validated, and sanitized values at the type level.