# YahooArchive/xss-filters

Secure XSS Filters.

Repository: https://github.com/YahooArchive/xss-filters
Canonical: https://ross.abutalabs.com/products/xss-filters
Language: JavaScript
License: NOASSERTION
License Family: other
Archived: true
Last push: 2016-09-12T20:03:46+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4227, "days_push": 3642, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: archived, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1070, forks 135 (observed 2026-08-28T04:03:28.005679+00:00)

## What it is
A JavaScript library providing context-dependent output filters to prevent cross-site scripting (XSS) attacks. It applies 'just sufficient' encoding based on the HTML5 spec, escaping only the minimal set of characters needed for each output context.

## Use cases
- prevent xss attacks in web apps
- sanitize untrusted user input before rendering html
- escape output in javascript templates
- avoid double-encoding of html entities
- securely embed urls in html attributes
- context-sensitive output escaping for handlebars

## When to choose
- you need context-aware XSS filtering instead of blind entity escaping
- you want faster output encoding with minimal character escaping
- you use Handlebars templates and want automatic secure escaping
- you need standards-compliant HTML5-based sanitization

## When to avoid
- you need a full HTML sanitizer to clean raw HTML input rather than escape output
- you need actively maintained software with recent updates
- your stack requires a license with clear terms

## Facets
- artifact type: library
- maturity: maintenance
- function: security, templating, middleware
- domain: security, web-development, frontend
- platform: browser
- tags: xss-prevention, output-encoding, context-sensitive-escaping, html5, handlebars, nodejs, javascript

## Member repositories
- YahooArchive/xss-filters (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:28.005679+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:54:00.199476+00:00, confidence not recorded.
  - readme: https://github.com/YahooArchive/xss-filters (fetched 2026-08-28T04:03:28.005679+00:00, sha b4ea529f8e5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
