From c448dd6af9cfc1cef5d1f2b5a2984a9d81b2168d Mon Sep 17 00:00:00 2001 From: Sean Meyer Date: Thu, 6 Feb 2020 12:54:18 +0800 Subject: [PATCH] update bleach to version 3 --- docs/conf.py | 2 +- setup.py | 2 +- src/wiki/core/markdown/__init__.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index bbe68984..9b687d80 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,7 +66,7 @@ def process_docstring(app, what, name, obj, options, lines): continue # Decode and strip any html out of the field's help text - help_text = bleach.clean(force_text(field.help_text)) + help_text = bleach.clean(force_text(field.help_text), strip=True) # Decode and capitalize the verbose name, for use if there isn't # any help text diff --git a/setup.py b/setup.py index 2847fa9f..ef68f292 100755 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def get_path(fname): install_requirements = [ "Django>=1.11,<2.3", - "bleach>=2.1,<2.2", + "bleach>=3.1.0,<3.2", "Pillow", "django-nyt>=1.1.5,<1.2", "django-mptt>=0.9,<0.10", diff --git a/src/wiki/core/markdown/__init__.py b/src/wiki/core/markdown/__init__.py index f282c37d..832eb54f 100644 --- a/src/wiki/core/markdown/__init__.py +++ b/src/wiki/core/markdown/__init__.py @@ -39,7 +39,7 @@ class ArticleMarkdown(markdown.Markdown): attrs.update(plugin_registry.get_html_attributes().items()) html = bleach.clean( - html, tags=tags, attributes=attrs, styles=settings.MARKDOWN_HTML_STYLES, + html, tags=tags, attributes=attrs, styles=settings.MARKDOWN_HTML_STYLES, strip=True ) return html -- 2.45.2