diff --git a/bleach-5.0.1.tar.gz b/bleach-5.0.1.tar.gz deleted file mode 100644 index 264c251..0000000 --- a/bleach-5.0.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d03255c47eb9bd2f26aa9bb7f2107732e7e8fe195ca2f64709fcf3b0a4a085c -size 199642 diff --git a/bleach-6.0.0.tar.gz b/bleach-6.0.0.tar.gz new file mode 100644 index 0000000..98e7761 --- /dev/null +++ b/bleach-6.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1a1a85c1595e07d8db14c5f09f09e6433502c51c595970edc090551f0db99414 +size 201298 diff --git a/de-vendor.patch b/de-vendor.patch index 9ed6028..850ee40 100644 --- a/de-vendor.patch +++ b/de-vendor.patch @@ -1,6 +1,8 @@ ---- a/bleach/html5lib_shim.py.orig -+++ b/bleach/html5lib_shim.py -@@ -14,46 +14,46 @@ warnings.filterwarnings( +Index: bleach-6.0.0/bleach/html5lib_shim.py +=================================================================== +--- bleach-6.0.0.orig/bleach/html5lib_shim.py ++++ bleach-6.0.0/bleach/html5lib_shim.py +@@ -14,27 +14,27 @@ warnings.filterwarnings( "ignore", message="html5lib's sanitizer is deprecated", category=DeprecationWarning, @@ -35,6 +37,9 @@ allowed_protocols, allowed_css_properties, allowed_svg_properties, +@@ -42,21 +42,21 @@ from bleach._vendor.html5lib.filters.san + svg_attr_val_allows_ref, + svg_allow_local_href, ) # noqa: E402 module level import not at top of file -from bleach._vendor.html5lib.filters.sanitizer import ( +from html5lib.filters.sanitizer import ( @@ -59,30 +64,23 @@ Trie, ) # noqa: E402 module level import not at top of file ---- a/tests/test_clean.py.orig -+++ b/tests/test_clean.py +Index: bleach-6.0.0/tests/test_clean.py +=================================================================== +--- bleach-6.0.0.orig/tests/test_clean.py ++++ bleach-6.0.0/tests/test_clean.py @@ -5,7 +5,7 @@ import pytest from bleach import clean from bleach.html5lib_shim import Filter - from bleach.sanitizer import ALLOWED_PROTOCOLS, Cleaner + from bleach.sanitizer import ALLOWED_PROTOCOLS, Cleaner, NoCssSanitizerWarning -from bleach._vendor.html5lib.constants import rcdataElements +from html5lib.constants import rcdataElements @pytest.mark.parametrize( ---- a/bleach/sanitizer.py.orig -+++ b/bleach/sanitizer.py -@@ -277,7 +277,7 @@ class BleachSanitizerFilter(html5lib_shi - "ignore", - message="html5lib's sanitizer is deprecated", - category=DeprecationWarning, -- module="bleach._vendor.html5lib", -+ module="html5lib", - ) - return super().__init__( - source, ---- a/bleach/parse_shim.py.orig -+++ b/bleach/parse_shim.py +Index: bleach-6.0.0/bleach/parse_shim.py +=================================================================== +--- bleach-6.0.0.orig/bleach/parse_shim.py ++++ bleach-6.0.0/bleach/parse_shim.py @@ -1 +1 @@ -from bleach._vendor.parse import urlparse # noqa +from urllib.parse import urlparse # noqa diff --git a/python-bleach.changes b/python-bleach.changes index 768818d..83ce0e4 100644 --- a/python-bleach.changes +++ b/python-bleach.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Mon May 8 11:57:24 UTC 2023 - Daniel Garcia + +- Update to 6.0.0: + * bleach.clean, bleach.sanitizer.Cleaner, + bleach.html5lib_shim.BleachHTMLParser: the tags and protocols + arguments were changed from lists to sets. + * bleach.linkify, bleach.linkifier.Linker: the skip_tags and + recognized_tags arguments were changed from lists to sets. + * bleach.sanitizer.BleachSanitizerFilter: strip_allowed_elements is + now strip_allowed_tags. We now use “tags” everywhere rather than a + mishmash of “tags” in some places and “elements” in others. + # 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 the style attribute + is allowed. (#676) + * Fix linkify handling of character entities. (#501) + * Rework dev dependencies to use requirements-dev.txt and + requirements-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. + ------------------------------------------------------------------- Fri Apr 21 12:22:44 UTC 2023 - Dirk Müller diff --git a/python-bleach.spec b/python-bleach.spec index 3db0df9..1b914f4 100644 --- a/python-bleach.spec +++ b/python-bleach.spec @@ -19,7 +19,7 @@ %{?sle15_python_module_pythons} Name: python-bleach -Version: 5.0.1 +Version: 6.0.0 Release: 0 Summary: A whitelist-based HTML-sanitizing tool License: Apache-2.0