From 6bdf13d30014072768fa9e733ee8af773e0339ad Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Mon, 13 May 2024 10:54:30 +1200 Subject: [PATCH] add span to allowed tags #185 --- app/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils.py b/app/utils.py index 7228a49d..4a328ddc 100644 --- a/app/utils.py +++ b/app/utils.py @@ -180,7 +180,7 @@ def allowlist_html(html: str) -> str: if html is None or html == '': return '' allowed_tags = ['p', 'strong', 'a', 'ul', 'ol', 'li', 'em', 'blockquote', 'cite', 'br', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'pre', - 'code', 'img', 'details', 'summary', 'table', 'tr', 'td', 'th', 'tbody', 'thead', 'hr'] + 'code', 'img', 'details', 'summary', 'table', 'tr', 'td', 'th', 'tbody', 'thead', 'hr', 'span'] # Parse the HTML using BeautifulSoup soup = BeautifulSoup(html, 'html.parser')