1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-09-19 10:49:46 +00:00

Added "br" to not sanitized comments tag

This commit is contained in:
Ozzie Isaacs 2024-07-08 14:09:53 +02:00
parent d26964ab08
commit 551828f8cf

View File

@ -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)