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.
Static XSS-oriented analysis for HTML-like strings.
This module provides the main detection layer of the package. It classifies
input as Safe, Suspicious, or Dangerous, and can also return warnings
explaining why a value was considered risky.
The analyzer is intended for detection and decision making. It does not rewrite
or sanitize the input by itself. For output sanitization, use
DetoXSS.Sanitize.
Warning produced by the analyzer.
A warning contains an optional source position, a risk level, and a human readable message explaining the finding.
Tree node annotated with XSS-related risk information.
selfWarnings describe findings directly related to the current node.
aggregateRisk also takes child nodes into account.
Classify an input string as Safe, Suspicious, or Dangerous.
This is a high-level helper for string-based classification.
Classify an input string using the balanced analyzer.
This combines parsing, AST-based analysis, and additional string-based heuristics.
Classify a list of parsed HTML-like nodes.
Classify a single parsed HTML-like node.
Analyze an input string and return a compact list of warnings.
This function is suitable for user-facing output because it removes duplicate or overly technical warnings.
Return the full internal warning list for an input string.
This is useful for debugging and dataset evaluation. For user-facing output,
prefer scanBalanced, which returns a more compact warning list.
Analyze a list of parsed HTML-like nodes.
Analyze a single parsed HTML-like node.
Build a risk-annotated tree from parsed HTML-like nodes.
The result can be used to visualize which parts of the input contributed to the overall risk.
Render a risk-annotated tree as readable text.
Render parsed HTML-like nodes as a readable text tree.
Render a single parsed HTML-like node as readable text.
Parse an input string into HTML-like nodes.
This function is tolerant and is intended for analysis, not for browser-exact HTML parsing.
Risk classification returned by the analyzer.
Safemeans that no known risky pattern was found.Suspiciousmeans that the input contains potentially risky patterns.Dangerousmeans that a clear XSS indicator was detected.