Bleach
Python library that sanitizes HTML by escaping or stripping markup and attributes that are not on an allowed list.
Bleach is a Python library that sanitizes HTML. It escapes or strips markup and attributes that are not on an allowed list, so untrusted HTML can be cleaned before it is used. It is installed from PyPI with pip.
The Mozilla Foundation holds the copyright on the code under the Apache License 2.0. The documentation carries the project’s end-of-maintenance note.
Worth knowing
The maintainer has ended the project. The README says Bleach is no longer maintained and will not get future releases, and the GitHub repository is archived.
Sources
- 2026-11-04: Status, Install with
github.com/mozilla/bleach/blob/main/README.rst - 2026-11-04: Status, links, Categories, Written in, GitHub stars
api.github.com/repos/mozilla/bleach - 2026-11-04: links
bleach.readthedocs.io/en/latest/ - 2026-11-04: First release, Runtime, Minimum runtime, Current major version, Last release
pypi.org/pypi/bleach/json - 2026-11-04: Maintainer, Maintained by, License, License model
github.com/mozilla/bleach/blob/main/LICENSE - 2026-11-04: Contributors
api.github.com/repos/mozilla/bleach/contributors?per_page=1 - 2026-11-04: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/pypi.org/packages/bleach