From ec7c7b3701315955c74202c3f78ca33a330aa80e Mon Sep 17 00:00:00 2001 From: Jennifer Richards Date: Mon, 23 Jan 2023 15:29:45 -0400 Subject: [PATCH] chore: Upgrade to bleach v6 (#5021) * build: Bump bleach requirement to 6.0.0 * fix: Update bleach configuration for compatibility with v6 changes --- ietf/utils/text.py | 8 ++++---- requirements.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ietf/utils/text.py b/ietf/utils/text.py index d5463c9f4..48f5538cb 100644 --- a/ietf/utils/text.py +++ b/ietf/utils/text.py @@ -20,11 +20,11 @@ import debug # pyflakes:ignore from .texescape import init as texescape_init, tex_escape_map tlds_sorted = sorted(tlds.tld_set, key=len, reverse=True) -protocols = copy.copy(bleach.sanitizer.ALLOWED_PROTOCOLS) -protocols.append("ftp") # we still have some ftp links -protocols.append("xmpp") # we still have some xmpp links +protocols = set(bleach.sanitizer.ALLOWED_PROTOCOLS) +protocols.add("ftp") # we still have some ftp links +protocols.add("xmpp") # we still have some xmpp links -tags = set(copy.copy(bleach.sanitizer.ALLOWED_TAGS)).union( +tags = set(bleach.sanitizer.ALLOWED_TAGS).union( { # fmt: off 'a', 'abbr', 'acronym', 'address', 'b', 'big', diff --git a/requirements.txt b/requirements.txt index a0e7953d1..7a5662ffa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ setuptools>=51.1.0 # Require this first, to prevent later errors argon2-cffi>=21.3.0 # For the Argon2 password hasher option beautifulsoup4>=4.11.1 # Only used in tests bibtexparser>=1.2.0 # Only used in tests -bleach>=5.0.0 +bleach>=6 celery>=5.2.6 coverage>=4.5.4,<5.0 # Coverage 5.x moves from a json database to SQLite. Moving to 5.x will require substantial rewrites in ietf.utils.test_runner and ietf.release.views decorator>=5.1.1