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.
cure53/dompurify 的主要功能包括:HTML Sanitization Utilities, Input Sanitization, Cross-Site Scripting Prevention, DOM Security Utilities, Trusted Types Policies, Trusted Types Integrations, Safe Rich Text Renderers, Trusted Types Polyfills。
cure53/dompurify 的开源替代品包括: leizongmin/js-xss — js-xss is an HTML XSS sanitizer and whitelist-based HTML filter designed to remove malicious code from untrusted HTML.… microcosm-cc/bluemonday — bluemonday is a Go library for scrubbing user-generated HTML content to prevent cross-site scripting and other… erusev/parsedown — Parsedown is a PHP library that converts Markdown text and common extensions into structured HTML output for web… rexxars/react-markdown — react-markdown is a React renderer that converts markdown text into a virtual DOM to safely display formatted content.… apostrophecms/sanitize-html — This is an HTML sanitization library designed to remove dangerous tags and attributes from user-submitted HTML to… chriso/validator.js — validator.js is a JavaScript string validation and sanitization library. It provides a set of functions to verify that…
js-xss is an HTML XSS sanitizer and whitelist-based HTML filter designed to remove malicious code from untrusted HTML. It serves as a tool for cross-site scripting prevention and user-generated content management by cleaning HTML strings to ensure safe browser rendering. The library includes a CSS style validator to scrub inline styles against a whitelist and an HTML content purifier capable of stripping all tags to extract raw text. It allows for custom HTML filtering through the definition of specific rules and handler functions to control permitted elements and attributes. The tool covers
bluemonday is a Go library for scrubbing user-generated HTML content to prevent cross-site scripting and other injection attacks. It functions as an HTML policy engine and sanitizer that removes dangerous scripts and malicious tags by applying configurable element and attribute allowlists. The project distinguishes itself through a rule-based system that utilizes regular expressions and name-based lists to define permitted tags, attributes, and CSS styles. It includes a URL security validator that enforces safe protocols and automatically injects security attributes such as nofollow and noope
Parsedown is a PHP library that converts Markdown text and common extensions into structured HTML output for web browsers. It functions as a Markdown to HTML converter that processes both block-level and inline elements to generate valid web content. The library includes a PHP HTML sanitizer designed to escape HTML and scripting vectors. This security layer provides input sanitization to prevent attacks when processing untrusted user-generated content.
react-markdown is a React renderer that converts markdown text into a virtual DOM to safely display formatted content. It functions as a markdown syntax parser and renderer that transforms markdown strings into structural elements, ensuring XSS-safe content delivery. The project allows for the mapping of standard markdown elements to custom React components for specialized styling and behavior. It supports syntax extensions through a plugin system, enabling additional formatting features such as tables, footnotes, and tasklists. The system includes security primitives for HTML and URL saniti