symfony-html-sanitizer
Installation
SKILL.md
symfony/html-sanitizer
If the project contains
.ddev/config.yaml, prefix every shell command withddev(full mapping in thesymfonyskill'sreferences/ddev.md). Examples target Symfony 7.4, 8.0 and newer — verify the installed version before using newer features.
When to use
You're accepting HTML from users (rich-text fields, comments, imported content) and need to strip dangerous markup before storing or rendering.
Replaces
ezyang/htmlpurifier(HTMLPurifier)strip_tags()(insufficient — leaves attributes)- Custom regex-based "sanitisers" (never trust these)