mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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.
This commit is contained in:
parent
eccd328d42
commit
2b280ea3d8
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue