chore(api): update dependency bleach to v6 (develop)
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
bleach | dependencies | major |
==5.0.1 -> ==6.1.0
|
Release Notes
mozilla/bleach (bleach)
v6.1.0
Backwards incompatible changes
- Dropped support for Python 3.7. (#709)
Security fixes
None
Bug fixes
- Add support for Python 3.12. (#710)
- Fix linkify with arrays in querystring (#436)
- Handle more cases with < followed by character data (#705)
- Fix entities inside a tags in linkification (#704)
- Update cap for tinycss2 to <1.3 (#702)
- Updated Sphinx requirement
- Add dependabot for github actions and update github actions
v6.0.0
Backwards incompatible changes
-
bleach.clean
,bleach.sanitizer.Cleaner
,bleach.html5lib_shim.BleachHTMLParser
: thetags
andprotocols
arguments were changed from lists to sets.Old pre-6.0.0:
.. code-block:: python
bleach.clean( "some text", tags=["a", "p", "img"],
^ ^ list
protocols=["http", "https"],
^ ^ list
)
New 6.0.0 and later:
.. code-block:: python
bleach.clean(
"some text",
tags={"a", "p", "img"},
^ ^ set
protocols={"http", "https"},
^ ^ set
)
-
bleach.linkify
,bleach.linkifier.Linker
: theskip_tags
andrecognized_tags
arguments were changed from lists to sets.Old pre-6.0.0:
.. code-block:: python
bleach.linkify( "some text", skip_tags=["pre"],
^ ^ list
)
linker = Linker(
skip_tags=["pre"],
^ ^ list
recognized_tags=html5lib_shim.HTML_TAGS + ["custom-element"],
^ ^ ^ list
|
| list concatenation
)
New 6.0.0 and later:
.. code-block:: python
bleach.linkify(
"some text",
skip_tags={"pre"},
^ ^ set
)
linker = Linker(
skip_tags={"pre"},
^ ^ set
recognized_tags=html5lib_shim.HTML_TAGS | {"custom-element"},
^ ^ ^ set
|
| union operator
)
-
bleach.sanitizer.BleachSanitizerFilter
:strip_allowed_elements
is nowstrip_allowed_tags
. We now use "tags" everywhere rather than a mishmash of "tags" in some places and "elements" in others.
Security fixes
None
Bug fixes
-
Add support for Python 3.11. (#675)
-
Fix API weirness in
BleachSanitizerFilter
. (#649)We're using "tags" instead of "elements" everywhere--no more weird overloading of "elements" anymore.
Also, it no longer calls the superclass constructor.
-
Add warning when
css_sanitizer
isn't set, but thestyle
attribute is allowed. (#676) -
Fix linkify handling of character entities. (#501)
-
Rework dev dependencies to use
requirements-dev.txt
andrequirements-flake8.txt
instead of extras. -
Fix project infrastructure to be tox-based so it's easier to have CI run the same things we're running in development and with flake8 in an isolated environment.
-
Update action versions in CI.
-
Switch to f-strings where possible. Make tests parametrized to be easier to read/maintain.
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.