awesome-repositories.com
المدونة
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
apostrophecms avatar

apostrophecms/sanitize-htmlArchived

0
View on GitHub↗
4,129 نجوم·371 تفرعات·JavaScript·MIT·4 مشاهدات

Sanitize Html

هذه مكتبة تعقيم HTML مصممة لإزالة العلامات والسمات الخطرة من HTML المقدم من المستخدم لمنع هجمات البرمجة عبر المواقع (XSS). تعمل كمرشح محتوى يقوم بإدراج عناصر وسمات محددة في القائمة البيضاء مع الهروب من الترميز غير المصرح به أو تجاهله.

يتضمن المشروع محرك تحويل HTML يسمح بتعديل أو استبدال العلامات والسمات باستخدام منطق مخصص. كما يتميز بمدقق نمط CSS لتنظيف الخصائص المضمنة مقابل الأنماط المسموح بها ونظام للتحقق من صحة عنوان URL للمورد لتقييد أسماء المضيفين والمخططات.

توفر المكتبة إمكانيات لتعقيم مدخلات المستخدم، والتحقق من صحة CSS المضمن، وتحويل HTML الديناميكي. يتم تنفيذ هذه الوظائف عبر محلل يدعم تصفية العلامات وتعريف العناصر المسموح بها.

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.

سجل النجوم

مخطط تاريخ النجوم لـ apostrophecms/sanitize-htmlمخطط تاريخ النجوم لـ apostrophecms/sanitize-html

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Sanitize Html

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Sanitize Html.
  • leizongmin/js-xssالصورة الرمزية لـ leizongmin

    leizongmin/js-xss

    5,319عرض على 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
    عرض على GitHub↗5,319
  • microcosm-cc/bluemondayالصورة الرمزية لـ microcosm-cc

    microcosm-cc/bluemonday

    3,688عرض على 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
    عرض على GitHub↗3,688
  • cnodejs/nodeclubالصورة الرمزية لـ cnodejs

    cnodejs/nodeclub

    9,303عرض على 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
    عرض على GitHub↗9,303
  • jhollingworth/bootstrap-wysihtml5الصورة الرمزية لـ jhollingworth

    jhollingworth/bootstrap-wysihtml5

    4,118عرض على 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
    عرض على GitHub↗4,118
عرض جميع البدائل الـ 30 لـ Sanitize Html→

الأسئلة الشائعة

ما هي وظيفة apostrophecms/sanitize-html؟

هذه مكتبة تعقيم HTML مصممة لإزالة العلامات والسمات الخطرة من HTML المقدم من المستخدم لمنع هجمات البرمجة عبر المواقع (XSS). تعمل كمرشح محتوى يقوم بإدراج عناصر وسمات محددة في القائمة البيضاء مع الهروب من الترميز غير المصرح به أو تجاهله.

ما هي الميزات الرئيسية لـ apostrophecms/sanitize-html؟

الميزات الرئيسية لـ apostrophecms/sanitize-html هي: Cross-Site Scripting Prevention, HTML Element Filters, URL Scheme Whitelisting, HTML Content Filters, CSS Sanitizers, Element Whitelisting, HTML Content Sanitization, Input Sanitization Filters.

ما هي البدائل مفتوحة المصدر لـ apostrophecms/sanitize-html؟

تشمل البدائل مفتوحة المصدر لـ apostrophecms/sanitize-html: 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…