FindSoftware

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

Current major version
16
Last release
2026-10-247

Adoption

GitHub stars
5,3123
npm downloads a week
7,468,1359
Contributors
388
Dependent repositories
111,11210
Dependent packages
89910

Why these figures do not compare

Sources

  1. 2026-11-16: links
    jsxss.com/en/index.html
  2. 2026-11-16: links
    jsxss.com/en/starter/quickstart.html
  3. 2026-11-16: links, GitHub stars
    api.github.com/repos/leizongmin/js-xss
  4. 2026-11-16: Maintainer, License, License model
    github.com/leizongmin/js-xss/blob/master/LICENSE
  5. 2026-11-16: Categories, Install with
    github.com/leizongmin/js-xss/blob/master/README.md
  6. 2026-11-16: Written in, Runtime, Minimum runtime, Current major version
    registry.npmjs.org/xss/latest
  7. 2026-11-16: Last release, First release
    registry.npmjs.org/xss
  8. 2026-11-16: Contributors
    api.github.com/repos/leizongmin/js-xss/contributors?per_page=1
  9. 2026-11-16: npm downloads a week
    api.npmjs.org/downloads/range/2026-11-08:2026-11-14/xss
  10. 2026-11-16: Dependent packages, Dependent repositories
    packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/xss

Last reviewed · Listed since Edit on GitHubThis page as markdownas JSON