diff --git a/bookwyrm/utils/sanitizer.py b/bookwyrm/utils/sanitizer.py index 4f5132c9e..1467ee3e1 100644 --- a/bookwyrm/utils/sanitizer.py +++ b/bookwyrm/utils/sanitizer.py @@ -6,7 +6,7 @@ def clean(input_text: str) -> str: """Run through "bleach" """ return bleach.clean( input_text, - tags=[ + tags={ "p", "blockquote", "br", @@ -20,7 +20,7 @@ def clean(input_text: str) -> str: "ul", "ol", "li", - ], + }, attributes=["href", "rel", "src", "alt", "data-mention"], strip=True, ) diff --git a/requirements.txt b/requirements.txt index d610d1e33..59ec8d2bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ aiohttp==3.9.4 -bleach==5.0.1 +bleach==6.1.0 boto3==1.34.74 bw-file-resubmit==0.6.0rc2 celery==5.3.1 @@ -55,7 +55,7 @@ pytest-django==4.8.0 pytest-env==0.6.2 pytest-xdist==2.3.0 pytidylib==0.3.2 -types-bleach==6.0.0.4 +types-bleach==6.1.0.20240331 types-dataclasses==0.6.6 types-Markdown==3.4.2.10 types-Pillow==10.2.0.20240311