Bleach

LSE top 100LSE top 100Bleach (69)Bleach (69)

Tool and Usage

Project details

Year of inception
License
Apache License 2.0
Programming language
Python
Latest release
6.1.0
Latest release date

Project health

76
This score is calculated by different factors, like project age, last release date, etc.

Why this tool?

Bleach is a library for Django that can sanitize HTML by escaping and stripping harmful content. It provides a filter for untrusted content and disarms potential unwanted scripts from the input. This may be useful to apply to data that is transmitted via HTML forms or otherwise.

How it works

Bleach uses the html5lib for Python and can deal with incorrect HTML code, like badly nested code or missing tags.

Based on the data you received, Bleach can apply a few actions on the code. The first one is to clean code, meaning that it will replace any potential harmful characters or strings. Special characters like < will be replaced into <. With the linkify function it can turn hyperlinks in text into actual links that are safe and given a related rel attribute.

Usage and audience

Bleach is commonly used for data sanitizing. Target users for this tool are developers.

Tool review and remarks

The review and analysis of this project resulted in the following remarks for this security tool:

Strengths

  • + More than 25 contributors
  • + More than 1000 GitHub stars
  • + The source code of this software is available

Author and Maintainers

Supporting company

This project is maintained by Mozilla Foundation

Installation

Supported operating systems

Bleach is known to work on Linux.

Bleach alternatives

Similar tools to Bleach:

74

django-sudo

Django-sudo provides a view decorator for Django web applications. It mimics the behavior of sudo on Linux systems and requires reauthentication.

74

django-guardian

Django-guardian extends the default Django permissions model. It does this by allowing permissions on each database object, adding fine-grained control.

74

django-security

Django-security is a toolkit for the Django framework with the focus on security. It provides models, views, and middleware to strengthen the defenses.

All Bleach alternatives

This tool page was updated at . Found an improvement? Help the community by submitting an update.

Related tool information

Categories

This tool is categorized as a Django security library, Django security tool, and data sanitizing tool.