mozilla/bleach
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes observed · 2026-08-28
Health v2 · maintenance only
10/100
- Activity 86
- Release rhythm 35
- Longevity 100
Flags: no_releases archived no_license
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 6040
- days_rel: n/a
- days_push: 89
- n_releases_24m: 0
Adoption not part of the score
2767 stars · 262 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Bleach is a Python library for sanitizing HTML from untrusted sources using an allowlist-based approach, escaping or stripping markup and attributes. It also safely linkifies text and relies on html5lib to handle malformed HTML as browsers do.
Use cases
- sanitize user-submitted HTML comments to prevent XSS
- strip dangerous tags and attributes from untrusted text
- clean HTML fragments from rich text editors
- linkify URLs in plain text safely
- fix unbalanced or mis-nested HTML tags
- escape script tags in user input
When to choose
- you need allowlist-based HTML sanitization in Python and can accept an unmaintained dependency
- you need browser-grade handling of malformed HTML fragments
- you need safe linkification with rel attribute control
When to avoid
- starting a new project - the project is no longer maintained and will receive no security fixes
- you need guaranteed security patches for sanitization of untrusted input
- you want to let trusted administrators use rich HTML - Bleach is designed for untrusted sources
Facets
library · maturity abandoned
security parser serialization web-development security developer-tools python html-sanitizer html-sanitization xss-prevention linkify allowlist untrusted-input no-longer-maintained
2 sources
- readme: https://github.com/mozilla/bleach · fetched 2026-08-28 · 56856d7b4bf5
- registry_pypi: https://pypi.org/pypi/bleach/json · fetched 2026-08-29 · 6921fd4cfd49
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| mozilla/bleach | main | 10 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem