js-xss
Node.js and browser module that sanitizes untrusted HTML against a whitelist of tags and attributes to prevent cross-site scripting.
js-xss sanitizes untrusted HTML against a whitelist of tags and attributes to prevent cross-site scripting. The site documents its use on Node.js and in the browser, and a command-line tool for processing files.
Worth knowing
When the whitelist allows the style attribute, its value is processed by the separate cssfilter module, which has its own default whitelist.
Identity
- Status
- Active
- Maintainer
- Zongmin Lei4
- Maintained by
- Individual
- First release
- 20127
Rendering and deploy
- Install with
- npm, bower5
Releases
Adoption
Sources
- 2026-11-16: links
jsxss.com/en/index.html - 2026-11-16: links
jsxss.com/en/starter/quickstart.html - 2026-11-16: links, GitHub stars
api.github.com/repos/leizongmin/js-xss - 2026-11-16: Maintainer, License, License model
github.com/leizongmin/js-xss/blob/master/LICENSE - 2026-11-16: Categories, Install with
github.com/leizongmin/js-xss/blob/master/README.md - 2026-11-16: Written in, Runtime, Minimum runtime, Current major version
registry.npmjs.org/xss/latest - 2026-11-16: Last release, First release
registry.npmjs.org/xss - 2026-11-16: Contributors
api.github.com/repos/leizongmin/js-xss/contributors?per_page=1 - 2026-11-16: npm downloads a week
api.npmjs.org/downloads/range/2026-11-08:2026-11-14/xss - 2026-11-16: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/xss