1 个仓库
Adjusts filtering logic based on the document structure to prevent bypasses in nested or malformed HTML.
Distinct from Context-Aware Tooling: Focuses on document-structure-aware sanitization, distinct from general tool-loading context.
Explore 1 awesome GitHub repository matching software engineering & architecture · Sanitization Contexts. Refine with filters or upvote what's useful.
DOMPurify is a security-focused library designed to sanitize untrusted HTML input, preventing cross-site scripting attacks by stripping malicious code while preserving safe content. It functions as a utility for secure document object model manipulation, ensuring that user-provided rich text can be rendered safely within web applications. The library distinguishes itself through a single-pass, mutation-observer-free processing model that operates on detached document fragments to avoid triggering unintended side effects. It employs recursive node traversal and context-aware logic to inspect a
Adapts sanitization logic dynamically to handle complex or nested HTML structures safely.