NOTE: 2026-06-05: Bleach is no longer maintained. There will be no future releases including for security issues. See issue: https://github.com/mozilla/bleach/issues/698
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes.
Bleach can also linkify text safely, applying filters that Django’s urlize filter cannot, and optionally setting rel attributes, even on links already in the text.
See the official website.