From cfd7002b14e109099359ec677fba4ccacd84c238 Mon Sep 17 00:00:00 2001 From: skywalker Date: Tue, 20 Aug 2024 17:32:46 +0800 Subject: [PATCH] update bleach.clean tags --- seahub/wiki/views.py | 4 ++-- test-requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/seahub/wiki/views.py b/seahub/wiki/views.py index 1480f60371..1895c42424 100644 --- a/seahub/wiki/views.py +++ b/seahub/wiki/views.py @@ -32,7 +32,7 @@ from seahub.seadoc.utils import get_seadoc_file_uuid logger = logging.getLogger(__name__) # https://github.com/yourcelf/bleach-whitelist/blob/master/bleach_whitelist/bleach_whitelist.py#L61 -markdown_tags = [ +markdown_tags = { "h1", "h2", "h3", "h4", "h5", "h6", "b", "i", "strong", "em", "tt", "p", "pre", "br", @@ -42,7 +42,7 @@ markdown_tags = [ "a", "sub", "sup", "table", "thead", "tbody", "tr", "th", "td", -] +} markdown_attrs = { "*": ["id", "class", "width", "height"], diff --git a/test-requirements.txt b/test-requirements.txt index 3e88a07350..fb31eab0a7 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,6 +4,6 @@ mock nose exam splinter -pytest +pytest==7.4.4 pytest-django selenium