BSD Ports

www/py-bleach 6.2.0_1 MidnightBSD

Easy safelist-based HTML-sanitizing tool

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
Apache-2.0
Categories
www, python

Description

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.

Bleach is intended for sanitizing text from untrusted sources. If you find yourself jumping through hoops to allow your site administrators to do lots of things, you're probably outside the use cases. Either trust those users, or don't.

Because it relies on html5lib, Bleach is as good as modern browsers at dealing with weird, quirky HTML fragments. And any of Bleach's methods will fix unbalanced or mis-nested tags.

In the other systems

The newest version among them is 6.4.0, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
MidnightBSDwww/py-bleach6.2.0_1 behind since 2026-07-08no data-[email protected]-
FreeBSDwww/py-bleach6.4.0 newestnone known-[email protected]2026-07-08
OpenBSDwww/py-bleach6.4.0 newestno data-The OpenBSD ports mailing-list <[email protected]>2026-10-14
NetBSDwww/py-bleach6.4.0 newestnone known-[email protected]-
DragonFlywww/py-bleach6.2.0 behind since 2026-07-08none known-[email protected]-
HardenedBSDwww/py-bleach6.4.0 newestno data-[email protected]-
GhostBSDwww/py-bleach6.4.0 newestno data-[email protected]-

Compare across BSDs

Install

Binary package:

mport install ${PYTHON_PKGNAMEPREFIX}bleach

From mports:

cd /usr/mports/www/py-bleach && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}bleach>0:www/py-bleach

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

As this port's Makefile names them.

Build 2

Runtime 1

Build dependencies 2
Run dependencies 1
Required by 1

Configuration

Options name: www_bleach

OptionDefaultDescription
CSSonCSS support
USES
cpe python shebangfix
Service scripts
none

Files

distinfo 1
FileSizeSHA256
bleach-6.2.0.tar.gz203083123e894118b8a599fd80d3ec1a6d4cc7ce4e5882b1317a7e1ba69b56e95f991f
Master sites 1
  • PYPI