mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-18 14:10:30 +00:00
Added "br" to not sanitized comments tag
This commit is contained in:
parent
d26964ab08
commit
551828f8cf
@ -35,7 +35,7 @@ def clean_string(unsafe_text, book_id=0):
|
|||||||
try:
|
try:
|
||||||
if bleach:
|
if bleach:
|
||||||
allowed_tags = list(ALLOWED_TAGS)
|
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))
|
safe_text = clean_html(unsafe_text, tags=set(allowed_tags))
|
||||||
else:
|
else:
|
||||||
safe_text = clean_html(unsafe_text)
|
safe_text = clean_html(unsafe_text)
|
||||||
|
Loading…
Reference in New Issue
Block a user