dompurifycmshtml

dompurifyCMSHTML: A sanitation utility to use when an agent must accept HTML from users, rich-text editors, imports, or model outputs but cannot safely render it directly. Uses DOMPurify to remove dangerous tags and unsafe attributes before previewing content, storing it to CMS fields, or embedding it in downstream pages.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "dompurifycmshtml" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-f2c6d4b50f75d30c103a5d1b3cd9a363e13f6fae16fb5bd6b2284ff23fcc2071. Verify the upstream source and version against https://skillhub.cn/skills/user_3c6cb52e/sanitize-untrusted-html-fragments-before-rendering-previews-comments-or-cms-content-dompurify-skillhub before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

dompurifyCMSHTML: A sanitation utility to use when an agent must accept HTML from users, rich-text editors, imports, or model outputs but cannot safely render it directly. Uses DOMPurify to remove dangerous tags and unsafe attributes before previewing content, storing it to CMS fields, or embedding it in downstream pages.

0 Downloads

Introduction source: third_party · user_3c6cb52e · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Software, accounts and paid services
Node.js or a JavaScript runtime with DOM support
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: "在使用DOMPurify渲染预览、评论或CMS内容之前,先清理不受信任的HTML片段。"
slug: "sanitize-untrusted-html-fragments-before-rendering-previews-comments-or-cms-content-dompurify"
version: "1.0.0"
displayName: "在使用DOMPurify渲染预览、评论或CMS内容之前,先清理不受信任的HTML片段。"
summary: "当代理必须接受来自用户、富文本编辑器、导入或模型输出的HTML,但无法安全地直接渲染时,请使用DOMPurify。该技能在内容显示预览、存储到CMS字段或嵌入下游页面之前,会清除危险标记和不安全属性。"
license: "MIT"
description: "当代理必须接受来自用户、富文本编辑器、导入或模型输出的HTML,但无法安全地直接渲染时,请使用DOMPurify。该技能在内容显示预览、存储到CMS字段或嵌入下游页面之前,会清除危险标记和不安全属性。"
github_stars: 16854
verification: "security_reviewed"
source: "https://github.com/1991513ccie-png/skills"
author: "1991513ccie-png"
publisher_type: "individual"
category: "Security & Verification"
framework: "Custom Agents"
tool_ecosystem:
  github_repo: "1991513ccie-png/skills"
  github_stars: 16854
  npm_package: "dompurify"
  npm_weekly_downloads: 165206079

在使用DOMPurify渲染预览、评论或CMS内容之前,先清理不受信任的HTML片段。

Use DOMPurify when an agent must accept HTML from users, rich text editors, imports, or model output but cannot safely render it as-is. The skill strips dangerous markup and unsafe attributes before the content is shown in previews, stored in CMS fields, or embedded in downstream pages.

Prerequisites

Node.js or a JavaScript runtime with DOM support

Installation

Use the upstream install or setup path that matches your environment:

  • npm install dompurify
  • npm install jsdom
  • npm install isomorphic-dompurify

Requirements and caveats from upstream:

  • Our automated tests cover 9 browser/OS combinations (Chromium, Firefox, and WebKit across Ubuntu, macOS, and Windows) on every push, plus Node.js v20, v22, v24, v25 and v26 running DOMPurify on [jsdom](https://github....
  • DOMPurify technically also works server-side with Node.js. Our support strives to follow the Node.js release cycle.
  • Running DOMPurify on the server requires a DOM to be present, which is probably no surprise. Usually, jsdom is the tool of choice and we strongly recommend to use the latest versi...

Basic usage or getting-started notes:

Documentation

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 解决 HTML 输入场景下的 XSS 安全风险,具有明确的安全刚需价值
  • 覆盖用户输入、富文本编辑器、模型输出等多种典型不安全 HTML 来源
Trigger Precision92/100

Highlights

  • 触发场景描述清晰完整,边界明确,覆盖多种变体
Structure and Standards75/100

Areas to improve

  • 缺少独立 When to Use 章节和端到端代码示例 Reported severity: Minor

    文档结构基本完整,但未提供具体的使用示例代码,When to Use 场景描述可更突出

    Recommendation: 建议补充一个完整的代码使用示例,并将 When to Use 场景独立成节以便用户快速理解

Highlights

  • frontmatter 完整,包含必要的元数据信息
  • 文档结构清晰,分章节合理
Execution Reliability82/100

Highlights

  • 工具来源明确,提供了多种安装路径和依赖说明
  • 提及了 server-side 使用需要 jsdom 等关键依赖和异常处理
Evidence Verifiability (mean of the first four)82/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 34, 35, 36
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • github....
  • github.com
  • nodejs.org
  • raw.githubusercontent.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Node.js or a JavaScript runtime with DOM support

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.