Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#34600 closed Cleanup/optimization (fixed)

Review reference to bleach in docs

Reported by: David Smith Owned by: Akash Kumar Sen
Component: Documentation Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The django docs make a couple of references to bleach to sanitise user input. However bleach is deprecated. Should we either remove this reference, or find another library to reference?

Docs- https://docs.djangoproject.com/en/4.2/ref/templates/builtins/#striptags

Bleach- https://github.com/mozilla/bleach

Change History (10)

comment:1 by Mariusz Felisiak, 11 months ago

Component: UncategorizedDocumentation
Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Agreed, we should no longer advertise bleach.

comment:2 by Natalia Bidart, 11 months ago

Is the goal here to just drop the reference to any HTML sanitizer, or shall we try to find a decent (and maintained) replacement?

It seems from this forum post that perhaps html-sanitizer may be a good alternative. There is also another one written in rust with non official python bindings available.

comment:3 by David Smith, 11 months ago

I think generally django avoids referring to 3rd party packages? Maybe we could reference the use of a sanitizer but without making a recommendation.

Maybe something like...

If you are looking for something more robust, you should investigate using a 3rd party HTML-sanitizing tool.

comment:4 by Natalia Bidart, 11 months ago

Easy pickings: set

Thanks David, makes sense not to endorse any particular library, +1 to your suggestion.

comment:5 by Akash Kumar Sen, 11 months ago

Owner: changed from nobody to Akash Kumar Sen
Status: newassigned

comment:6 by Akash Kumar Sen, 11 months ago

Has patch: set

comment:8 by Mariusz Felisiak, 11 months ago

Triage Stage: AcceptedReady for checkin

comment:9 by Mariusz Felisiak <felisiak.mariusz@…>, 11 months ago

Resolution: fixed
Status: assignedclosed

In b0a6cc7f:

Fixed #34600 -- Removed references to bleach in docs.

comment:10 by Mariusz Felisiak <felisiak.mariusz@…>, 11 months ago

In dca5f5d:

[4.2.x] Fixed #34600 -- Removed references to bleach in docs.

Backport of b0a6cc7f5738d6b959faf10354b772338f611fd9 from main

Note: See TracTickets for help on using tickets.
Back to Top