30 open-source projects similar to apostrophecms/sanitize-html, ranked by how many features they have in common. Compare stars, activity and what each one does to find the best Sanitize Html alternative.
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
bootstrap-wysihtml5 is a rich text editor that integrates with the Bootstrap CSS framework to provide a visual interface for formatting HTML content. It functions as a localizable web editor and an HTML content parser that filters and validates tags and attributes to ensure clean content output. The project features a customizable rich text interface that allows for the modification of the toolbar and overall visual presentation through external stylesheets and HTML templates. It includes support for custom locale definitions and translated interface labels to accommodate international users.
Simditor is a JavaScript-based rich text editor and WYSIWYG HTML editor designed for creating structured documents within web applications. It functions as a web-based media editor and HTML content sanitizer, allowing users to compose and format content visually. The project distinguishes itself through an integrated system for handling media and security. It features server-side image upload capabilities that support both local file selection and clipboard pasting, alongside a whitelist-based HTML markup filtering system to ensure consistent and secure output. The editor provides broad capa
Streamdown is a streaming markdown renderer for React that transforms incoming markdown text into sanitized HTML in real time, handling incomplete blocks as they arrive. It parses GitHub-Flavored Markdown syntax including tables, task lists, and footnotes, and renders LaTeX math expressions using KaTeX, Mermaid diagrams as interactive SVGs, and code blocks with Shiki-based syntax highlighting supporting over 200 languages with dual light and dark themes. The renderer includes an XSS-safe HTML sanitizer that strips dangerous tags and validates URLs to prevent injection attacks. What distinguis
Nodeclub is a self-hosted community forum and bulletin board system built as a Node.js web application. It serves as a platform for hosting social communities and managing user discussions. The software incorporates a markdown-based content management system for authoring rich text posts. It includes tools for user account management, registration, and administrative account activation to control platform access. The system provides content moderation through HTML sanitization and post submission rate limits. Additional capabilities include automated email notifications, Google Analytics int
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
Jsoup is a Java library designed for parsing, extracting, and manipulating HTML and XML content. It provides a document object model that represents web content as a hierarchical tree, allowing for programmatic navigation and modification of elements, attributes, and text. The library functions as a toolkit for web scraping, enabling the retrieval of remote content via standard web protocols and the management of HTTP sessions for automated form interaction. The library distinguishes itself through its fault-tolerant tokenization, which reconstructs valid document structures from malformed or
Cherry Markdown is a web-based Markdown editor and parsing engine that converts markup text into sanitized HTML with a real-time synchronized preview pane. It functions as a rich text interface and WYSIWYG tool, providing a system for transforming markup strings into HTML documents or portable formats. The project distinguishes itself through high-performance rendering and a flexible extensibility model. It uses virtual DOM diffing and partial rendering to maintain responsiveness in large documents, and it allows for the creation of custom parsing rules and specialized HTML components via a p
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
This project is a curated collection of technical interview questions and detailed answers designed for professional software engineering roles. It serves as an Angular framework study resource and interview guide for developers preparing for frontend engineering assessments. The resource covers core architectural patterns including component-based view architecture, hierarchical dependency injection, and declarative template binding. It also addresses implementation details regarding observable-driven data streams and the use of directives for DOM manipulation. Additional content focuses on
Templ is a type-safe HTML templating engine and UI framework for Go. It provides a system for building reusable HTML components that compile into Go code for server-side rendering, ensuring type safety and compile-time validation of data and logic. The project features a dedicated language server that provides autocomplete and syntax validation for template files within supported code editors. It employs compile-time code generation to transform a custom template language into Go source code, enabling the creation of modular HTML fragments and logic blocks. The framework includes automated s
html-to-markdown is a tool that transforms HTML content and websites into Markdown text. It functions as an HTML to Markdown converter and a command line processor for converting files or standard input streams into Markdown documents. The project is an extensible conversion engine that allows for custom element rendering and the registration of plugins to modify the transformation process. It includes a content filter that uses CSS selectors to include or exclude specific HTML elements during conversion. The system covers broad capability areas including link resolution for relative URLs, r
markdown-it is a token-based Markdown compiler and CommonMark-compliant parser that converts structured plaintext markup into HTML. It functions as an extensible markup processor designed to transform text into browser-ready content while managing security and preventing cross-site scripting. The project is distinguished by a modular plugin system that allows for the extension of parsing capabilities and the addition of custom syntax, such as footnotes, tables, or emojis. It utilizes a two-stage tokenization process to break documents into structural tokens before rendering them into final HT
Sanitize is a Ruby library designed to clean untrusted HTML and CSS input by enforcing strict security policies. It functions as a web input validator and security filtering tool, processing HTML fragments or full documents to remove unauthorized elements, attributes, and dangerous code patterns that could lead to cross-site scripting or injection attacks. The library distinguishes itself through a tree-based traversal mechanism that evaluates document structures against customizable allowlists. Beyond standard filtering, it provides granular control over content by allowing developers to inj
PHP HTML Parser is a server-side programming library and DOM parser designed to ingest markup documents and structure them into a navigable parent-child object tree. The library provides a stream-based character lexer and a configurable rule engine that manages parser strictness, whitespace preservation, tag closing behavior, and character encoding detection during document ingestion. Content loading is handled through a pluggable retrieval layer that accepts local file paths, raw strings, and remote network URLs. Once loaded, documents can be queried using a chainable CSS selector engine th
parse5 is a WHATWG HTML parser and serializer for Node.js. It transforms HTML strings into a document object model and converts those trees back into valid HTML strings, following the logic defined by the HTML Living Standard. The project functions as a streaming HTML processor, using incremental parsing to handle large documents in chunks. It includes an HTML5 compliant tokenizer that uses a state-machine approach to break input into tokens according to official web specifications. The toolset covers HTML document parsing, serialization, and real-time rewriting via streams. These capabiliti
Redcarpet is a security-focused Markdown to HTML parser and customizable renderer. It transforms Markdown text into structured HTML output while utilizing a security layer to filter or escape user-provided HTML tags and restrict link protocols to prevent vulnerabilities. The project distinguishes itself through a framework for custom document formatting, allowing the definition of how specific Markdown elements are converted to HTML via callback functions and custom classes. It also functions as a typographic formatter that converts standard punctuation and dashes into professional curly quot
The OWASP Cheat Sheet Series is a comprehensive, community-driven repository of concise security best practices and defensive coding patterns. It serves as a centralized knowledge base for developers and security professionals, providing actionable guidance to secure applications across the entire software development lifecycle. The project covers a vast array of security domains, ranging from fundamental web application hardening and authentication protocols to specialized controls for modern infrastructure and artificial intelligence systems. What distinguishes this project is its decentral
Validator.js is a library of pure, stateless functions designed for the validation and sanitization of string data within any JavaScript environment. It provides a modular suite of tools to verify that user-provided information conforms to specific formats, such as emails, URLs, and dates, while simultaneously cleaning untrusted input to mitigate security risks. The library distinguishes itself through a design that avoids platform-specific APIs, ensuring consistent execution across browsers, servers, and edge runtimes. By utilizing a pre-compiled regular expression engine and a pure data tra
Isso is a self-hosted commenting system that provides a server and client-side script for adding interactive discussion threads to websites. It functions as an independent platform for managing site-wide comment sections and user profiles on private infrastructure, utilizing a JSON API and a Markdown rendering engine to handle user-generated content. The system is designed to support multi-site comment management, allowing a single server installation to serve independent threads for multiple different domains. It includes a dedicated moderation tool featuring signed URLs and an administrativ
This library provides a component-based solution for parsing and rendering markdown content directly within Angular applications. It functions as a bridge between raw markdown text and formatted HTML, enabling the display of dynamic content, remote documentation, and technical guides within a framework-native environment. The library distinguishes itself through a modular pipeline that allows for deep customization of the rendering process. Developers can override default HTML generation for specific elements, integrate third-party plugins for advanced syntax support, and manage the parsing l
mavonEditor is a markdown editor component for Vue applications that functions as a markdown-to-HTML converter and a visual text editor. It provides a synchronized preview and a writing interface that renders markdown content in real-time. The project includes a security layer that cleans HTML tags and attributes through sanitization to prevent the execution of malicious scripts in the browser. The editor supports technical documentation authoring with capabilities for mathematical notation, footnotes, automated tables of contents, and code syntax highlighting. It also includes a system for
Squire is a DOM-based rich text editor and WYSIWYG content editor that treats raw HTML as the source of truth. It functions as a system for manipulating the document object model directly to provide a visual interface for editing complex web content. The project focuses on arbitrary HTML editing, allowing the modification of any HTML content without losing original formatting. It includes tools for HTML content normalization and sanitization to ensure that raw input is cleaned and structured consistently before being rendered as editable nodes. The editor's capability surface covers inline f
Dillinger is a browser-based Markdown HTML5 editor designed for real-time text editing and visual rendering. It functions as a cloud-synced writing tool that transforms markup syntax into live HTML previews, utilizing OAuth-integrated authentication to connect users with third-party services. The project distinguishes itself by integrating cloud document synchronization with external storage providers and offering direct publishing capabilities to platforms such as Medium. It also includes a dedicated Markdown-to-PDF converter for generating professional documents and a focus mode to create a
Trumbowyg is a lightweight JavaScript WYSIWYG editor used to create and format rich-text and HTML content directly within a web browser. It serves as a client-side tool for generating semantic HTML markup and authoring web content. The project features a modular, plugin-based architecture that allows for the addition of new formatting commands and toolbar buttons. It provides a configurable interface where the toolbar layout can be customized via a predefined array and labels can be translated through localization files. The editor covers a wide range of content manipulation capabilities, in
Roundcube is an open-source, self-hosted webmail client designed for reading, composing, and organizing emails stored on remote servers using IMAP and SMTP protocols. It provides a browser-based interface that allows users to manage their mailboxes and sender identities through a secure communication platform. The platform is distinguished by its modular architecture, featuring a plugin-based extension system for adding new functional modules and a skin-based theme layer for customizing the visual appearance and responsive layouts. It further supports embedding its interface into external clo
SwiftSoup is a cross-platform HTML processing library for Swift that converts raw HTML or XML strings and files into a structured document object model. It provides the core infrastructure to parse web content into a traversable tree, enabling programmatic access to page elements across iOS, macOS, and Linux. The library features a CSS selector engine for data extraction and a whitelist-based sanitization system to remove unsafe tags and attributes from user-submitted content. It optimizes repetitive document queries through memoized query caching. The project covers DOM manipulation for upd
Markstream-vue is a specialized rendering library for Vue and Nuxt applications designed to process and display streaming markdown content in real time. It provides a dedicated component for handling incoming text streams, such as those generated by artificial intelligence models, by converting them into structured visual layouts as the data arrives. The library distinguishes itself through a performance-focused rendering engine that utilizes document virtualization to manage long-form content. By rendering only the segments currently visible within the user viewport, it maintains smooth scro
This repository contains the HTML specification, which defines the core standards for web page structuring, content organization, and document rendering. It establishes the fundamental algorithms for state-machine-based tokenization, tree construction for the document object model, and origin-based security isolation. The specification provides a framework for defining custom elements with independent lifecycles and registries. It also details the requirements for cross-document communication, session history management, and the synchronization of interface properties with content attributes.