awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
apostrophecms avatar

apostrophecms/sanitize-htmlArchived

0
View on GitHub↗
4,129 Stars·371 Forks·JavaScript·MIT·4 Aufrufe

Sanitize Html

This is an HTML sanitization library designed to remove dangerous tags and attributes from user-submitted HTML to prevent cross-site scripting attacks. It functions as a content filter that whitelists specific elements and attributes while escaping or discarding unauthorized markup.

The project includes an HTML transformation engine that allows for the modification or replacement of tags and attributes using custom logic. It also features a CSS style validator to clean inline properties against permitted patterns and a system for resource URL validation to restrict hostnames and schemes.

The library provides capabilities for user input sanitization, inline CSS validation, and dynamic HTML transformation. These functions are implemented via a parser that supports tag filtering and the definition of allowed elements.

Features

  • Cross-Site Scripting Prevention - Prevents cross-site scripting attacks by stripping unauthorized tags and attributes using a whitelist approach.
  • HTML Element Filters - Provides a system to define permitted HTML tags and attributes using exact matches, wildcards, or regex.
  • URL Scheme Whitelisting - Validates link and resource destinations by restricting permitted URI protocols and hostnames.
  • HTML Content Filters - Controls permitted HTML elements and attributes to ensure security and consistent formatting.
  • CSS Sanitizers - Cleans and validates inline CSS properties against permitted patterns to prevent injection attacks.
  • Element Whitelisting - Retains only specific HTML tags and attributes that match an explicit permitted whitelist.
  • HTML Content Sanitization - Removes dangerous tags and attributes from user-submitted HTML to prevent cross-site scripting attacks.
  • Input Sanitization Filters - Cleans user-submitted HTML to remove malicious scripts and dangerous elements before rendering.
  • Attribute Injection Validators - Uses regular expressions to validate attributes and CSS properties, preventing malicious code injection.
  • CSS Security Validators - Cleans inline CSS properties against permitted patterns to ensure safe styling in user content.
  • Inline Style Scrubbers - Filters style attributes to ensure only safe CSS properties and values are permitted.
  • Custom Handler Transformations - Provides a transformation engine to modify or replace HTML tags and attributes via custom callback logic.
  • HTML Document Transformation - Modifies HTML content using custom logic to meet application-specific requirements during cleaning.
  • Parser Event Interception - Allows custom logic to be executed during the opening and closing of tags for advanced filtering.
  • Tag Discard Policies - Configures whether forbidden tags are discarded, escaped, or converted to plain text.
  • Tag Transformations - Modifies or replaces specific tags and attributes using custom logic during the cleaning process.
  • Resource URL Validations - Restricts permitted hostnames and schemes in links and frames to ensure content loads from trusted sources.
  • Parser Event-Based Filtering - Implements HTML processing by reacting to streaming parser events for open and close tags.
  • Streaming DOM Reconstruction - Builds clean output strings by selectively appending parsed tokens that pass security filters.
  • Parsing Tools - HTML sanitization tool.
  • Security and Sanitization - Simple API for HTML sanitization.

Star-Verlauf

Star-Verlauf für apostrophecms/sanitize-htmlStar-Verlauf für apostrophecms/sanitize-html

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Open-Source-Alternativen zu Sanitize Html

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Sanitize Html.
  • leizongmin/js-xssAvatar von leizongmin

    leizongmin/js-xss

    5,319Auf GitHub ansehen↗

    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

    HTML
    Auf GitHub ansehen↗5,319
  • microcosm-cc/bluemondayAvatar von microcosm-cc

    microcosm-cc/bluemonday

    3,688Auf GitHub ansehen↗

    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

    Goallowlistgogolang
    Auf GitHub ansehen↗3,688
  • cnodejs/nodeclubAvatar von cnodejs

    cnodejs/nodeclub

    9,303Auf GitHub ansehen↗

    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

    JavaScript
    Auf GitHub ansehen↗9,303
  • jhollingworth/bootstrap-wysihtml5Avatar von jhollingworth

    jhollingworth/bootstrap-wysihtml5

    4,118Auf GitHub ansehen↗

    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.

    JavaScript
    Auf GitHub ansehen↗4,118
Alle 30 Alternativen zu Sanitize Html anzeigen→

Häufig gestellte Fragen

Was macht apostrophecms/sanitize-html?

This is an HTML sanitization library designed to remove dangerous tags and attributes from user-submitted HTML to prevent cross-site scripting attacks. It functions as a content filter that whitelists specific elements and attributes while escaping or discarding unauthorized markup.

Was sind die Hauptfunktionen von apostrophecms/sanitize-html?

Die Hauptfunktionen von apostrophecms/sanitize-html sind: Cross-Site Scripting Prevention, HTML Element Filters, URL Scheme Whitelisting, HTML Content Filters, CSS Sanitizers, Element Whitelisting, HTML Content Sanitization, Input Sanitization Filters.

Welche Open-Source-Alternativen gibt es zu apostrophecms/sanitize-html?

Open-Source-Alternativen zu apostrophecms/sanitize-html sind unter anderem: 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… cnodejs/nodeclub — Nodeclub is a self-hosted community forum and bulletin board system built as a Node.js web application. It serves as a… jhollingworth/bootstrap-wysihtml5 — bootstrap-wysihtml5 is a rich text editor that integrates with the Bootstrap CSS framework to provide a visual… mycolorway/simditor — Simditor is a JavaScript-based rich text editor and WYSIWYG HTML editor designed for creating structured documents… vercel/streamdown — Streamdown is a streaming markdown renderer for React that transforms incoming markdown text into sanitized HTML in…