awesome-repositories.com
Blog
awesome-repositories.com

Descubre los mejores repositorios open-source con nuestra búsqueda potenciada por IA.

ExplorarBúsquedas curadasAlternativas open-sourceSoftware autohospedableBlogMapa del sitio
ProyectoAcerca deCómo clasificamosPrensaServidor MCP
Aviso legalPrivacidadTérminos
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
apostrophecms avatar

apostrophecms/sanitize-htmlArchived

0
View on GitHub↗
4,129 estrellas·371 forks·JavaScript·MIT·4 vistas

Sanitize Html

Esta es una librería de sanitización de HTML diseñada para eliminar etiquetas y atributos peligrosos del HTML enviado por el usuario para evitar ataques de cross-site scripting (XSS). Funciona como un filtro de contenido que incluye en una lista blanca elementos y atributos específicos mientras escapa o descarta el marcado no autorizado.

El proyecto incluye un motor de transformación HTML que permite la modificación o reemplazo de etiquetas y atributos utilizando lógica personalizada. También cuenta con un validador de estilos CSS para limpiar propiedades en línea contra patrones permitidos y un sistema para la validación de URL de recursos para restringir nombres de host y esquemas.

La librería proporciona capacidades para la sanitización de entradas de usuario, validación de CSS en línea y transformación dinámica de HTML. Estas funciones se implementan a través de un analizador (parser) que admite el filtrado de etiquetas y la definición de elementos permitidos.

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.

Historial de estrellas

Gráfico del historial de estrellas de apostrophecms/sanitize-htmlGráfico del historial de estrellas de apostrophecms/sanitize-html

Búsqueda con IA

Explora más repositorios increíbles

Describe lo que necesitas en lenguaje sencillo: la IA clasifica miles de proyectos open-source curados por relevancia.

Start searching with AI

Preguntas frecuentes

¿Qué hace apostrophecms/sanitize-html?

Esta es una librería de sanitización de HTML diseñada para eliminar etiquetas y atributos peligrosos del HTML enviado por el usuario para evitar ataques de cross-site scripting (XSS). Funciona como un filtro de contenido que incluye en una lista blanca elementos y atributos específicos mientras escapa o descarta el marcado no autorizado.

¿Cuáles son las características principales de apostrophecms/sanitize-html?

Las características principales de apostrophecms/sanitize-html son: Cross-Site Scripting Prevention, HTML Element Filters, URL Scheme Whitelisting, HTML Content Filters, CSS Sanitizers, Element Whitelisting, HTML Content Sanitization, Input Sanitization Filters.

¿Qué alternativas de código abierto existen para apostrophecms/sanitize-html?

Las alternativas de código abierto para apostrophecms/sanitize-html incluyen: 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…

Alternativas open-source a Sanitize Html

Proyectos open-source similares, clasificados según cuántas características comparten con Sanitize Html.
  • leizongmin/js-xssAvatar de leizongmin

    leizongmin/js-xss

    5,319Ver en GitHub↗

    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
    Ver en GitHub↗5,319
  • microcosm-cc/bluemondayAvatar de microcosm-cc

    microcosm-cc/bluemonday

    3,688Ver en GitHub↗

    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
    Ver en GitHub↗3,688
  • cnodejs/nodeclubAvatar de cnodejs

    cnodejs/nodeclub

    9,303Ver en GitHub↗

    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
    Ver en GitHub↗9,303
  • jhollingworth/bootstrap-wysihtml5Avatar de jhollingworth

    jhollingworth/bootstrap-wysihtml5

    4,118Ver en GitHub↗

    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
    Ver en GitHub↗4,118
  • Ver las 30 alternativas a Sanitize Html→