summaryrefslogtreecommitdiffstats
path: root/aurweb
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-04-24 17:39:40 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2017-04-24 21:10:02 +0200
commit362ee754e7d28c36f74b7feee03e529a380dd379 (patch)
treec17b49ce15a117956a61a8d7c763211af6396349 /aurweb
parent136171e509b78d89b095bc5599bc158acd1250e7 (diff)
downloadaur-362ee754e7d28c36f74b7feee03e529a380dd379.tar.gz
aur-362ee754e7d28c36f74b7feee03e529a380dd379.tar.xz
Do not keep line breaks in comments
With the new Markdown support, text paragraphs are now properly converted to HTML paragraphs, so we no longer need to keep line breaks. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb')
-rwxr-xr-xaurweb/scripts/rendercomment.py4
1 files changed, 2 insertions, 2 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)