From 1cce2d82b8893404eb785dd1f94693ad19937c0d Mon Sep 17 00:00:00 2001 From: freamon Date: Sat, 6 Apr 2024 10:44:03 +0100 Subject: [PATCH] Add horizontal rule to allowed html tags --- app/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils.py b/app/utils.py index d100c842..61957687 100644 --- a/app/utils.py +++ b/app/utils.py @@ -169,7 +169,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'] + 'code', 'img', 'details', 'summary', 'table', 'tr', 'td', 'th', 'tbody', 'thead', 'hr'] # Parse the HTML using BeautifulSoup soup = BeautifulSoup(html, 'html.parser')