What's your favorite alternative to bleach for sanitizing HTML?

This page summarizes the projects mentioned and recommended in the original post on /r/django

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • bleach

    Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes

  • I noticed via the changelog for Django 4.2.2 that bleach is deprecated (Django removed mention of it from their docs).

  • html-sanitizer

    Allowlist-based HTML cleaner (by matthiask)

  • html-sanitizer

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • ammonia

    Repair and secure untrusted HTML

  • nh3 which is a python binding for the Rust-based ammonia

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts