Commit 2b280ea3 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Allow manual breaks and horizontal lines in comments

When sanitizing rendered comments, keep <hr> tags and <br> tags. The
former are generated when using "---" in Markdown comments, the latter
are used when putting two spaces at the end of a line.

Fixes FS#56649.
parent eccd328d
......@@ -119,8 +119,8 @@ def main():
FlysprayLinksExtension(),
GitCommitsExtension(pkgbase),
HeadingExtension()])
allowed_tags = bleach.sanitizer.ALLOWED_TAGS + \
['p', 'pre', 'h4', 'h5', 'h6']
allowed_tags = (bleach.sanitizer.ALLOWED_TAGS +
['p', 'pre', 'h4', 'h5', 'h6', 'br', 'hr'])
html = bleach.clean(html, tags=allowed_tags)
save_rendered_comment(conn, commentid, html)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment