diff options
-rwxr-xr-x | aurweb/scripts/rendercomment.py | 4 | ||||
-rwxr-xr-x | test/t2600-rendercomment.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/aurweb/scripts/rendercomment.py b/aurweb/scripts/rendercomment.py index 659e18ad..c23ef8de 100755 --- a/aurweb/scripts/rendercomment.py +++ b/aurweb/scripts/rendercomment.py @@ -86,9 +86,9 @@ def main(): conn = aurweb.db.Connection() text, pkgbase = get_comment(conn, commentid) - html = markdown.markdown(text, extensions=['nl2br', LinkifyExtension(), + html = markdown.markdown(text, extensions=[LinkifyExtension(), GitCommitsExtension(pkgbase)]) - allowed_tags = bleach.sanitizer.ALLOWED_TAGS + ['p', 'br'] + allowed_tags = bleach.sanitizer.ALLOWED_TAGS + ['p'] html = bleach.clean(html, tags=allowed_tags) save_rendered_comment(conn, commentid, html) diff --git a/test/t2600-rendercomment.sh b/test/t2600-rendercomment.sh index 8da15291..edf290cd 100755 --- a/test/t2600-rendercomment.sh +++ b/test/t2600-rendercomment.sh @@ -12,7 +12,7 @@ test_expect_success 'Test comment rendering.' ' EOD "$RENDERCOMMENT" 1 && cat <<-EOD >expected && - <p>Hello world!<br> + <p>Hello world! This is a comment.</p> EOD cat <<-EOD | sqlite3 aur.db >actual && |