Fix markdown bug

This commit is contained in:
cuom1999 2022-10-27 14:55:37 -05:00
parent 0eaffafc73
commit f3bed03d8f

View file

@ -71,7 +71,7 @@ class CommentFeed(Feed):
key = "comment_feed:%d" % comment.id key = "comment_feed:%d" % comment.id
desc = cache.get(key) desc = cache.get(key)
if desc is None: if desc is None:
desc = str(markdown(comment.body, "comment")) desc = str(markdown(comment.body))
desc = escape_xml_illegal_chars(desc) desc = escape_xml_illegal_chars(desc)
cache.set(key, desc, 86400) cache.set(key, desc, 86400)
return desc return desc
@ -104,7 +104,7 @@ class BlogFeed(Feed):
key = "blog_feed:%d" % post.id key = "blog_feed:%d" % post.id
summary = cache.get(key) summary = cache.get(key)
if summary is None: if summary is None:
summary = str(markdown(post.summary or post.content, "blog")) summary = str(markdown(post.summary or post.content))
summary = escape_xml_illegal_chars(summary) summary = escape_xml_illegal_chars(summary)
cache.set(key, summary, 86400) cache.set(key, summary, 86400)
return summary return summary