|
@@ -38,11 +38,11 @@ template = functools.partial (
|
|
|
'md2txt': lambda text: bleach.clean (markdown.markdown (text),
|
|
|
tags=[], attributes={}, styles=[], strip=True),
|
|
|
# Convert markdown to html
|
|
|
- 'md2html': lambda text: bleach.clean (markdown.markdown (
|
|
|
+ 'md2html': lambda text: bleach.clean (bleach.linkify (markdown.markdown (
|
|
|
text,
|
|
|
# https://python-markdown.github.io/extensions/
|
|
|
extensions=[ 'extra', 'admonition', 'nl2br', 'smarty' ],
|
|
|
- output_format='html5')),
|
|
|
+ output_format='html5'))),
|
|
|
# Get the domain part of a URL
|
|
|
'netloc': lambda url: urlparse (url).netloc
|
|
|
},
|
|
@@ -476,6 +476,7 @@ def post_thread (hash_id):
|
|
|
user = session.user ()
|
|
|
post = database.get_post (hash_id, user['id'] if user else None)
|
|
|
comments = database.get_post_comments (post['id'], user['id'] if user else None)
|
|
|
+ topics = database.get_post_topics (post['id'])
|
|
|
|
|
|
# Group comments by parent
|
|
|
comments_tree = {}
|
|
@@ -520,6 +521,7 @@ def post_thread (hash_id):
|
|
|
'post.html',
|
|
|
post=post,
|
|
|
comments=comments,
|
|
|
+ topics=topics,
|
|
|
show_source=show_source,
|
|
|
votes = {
|
|
|
'post': {},
|