Sanitize untrusted HTML fragments before rendering previews, comments, or CMS content with DOMPurify

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.

agentskillexchange Updated 28 repo stars

File contents

agentskillexchange/skills/tree/main/skills/sanitize-untrusted-html-fragments-before-rendering-previews-comments-or-cms-content-dompurify commit 4b0e7de6bc

Frequently asked questions

npx skillmds@latest add agentskillexchange/sanitize-untrusted-html-fragments-before-rendering-previews-