From 551828f8cf8fb9f052d90456a3eb7ebaa8529cc6 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 8 Jul 2024 14:09:53 +0200 Subject: [PATCH] Added "br" to not sanitized comments tag --- cps/clean_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/clean_html.py b/cps/clean_html.py index fc4fe6d1..c687f154 100644 --- a/cps/clean_html.py +++ b/cps/clean_html.py @@ -35,7 +35,7 @@ def clean_string(unsafe_text, book_id=0): try: if bleach: allowed_tags = list(ALLOWED_TAGS) - allowed_tags.extend(["p", "span", "div", "pre", "h1", "h2", "h3", "h4", "h5", "h6"]) + allowed_tags.extend(["p", "span", "div", "pre", "br", "h1", "h2", "h3", "h4", "h5", "h6"]) safe_text = clean_html(unsafe_text, tags=set(allowed_tags)) else: safe_text = clean_html(unsafe_text)