Hack around Markdown parser failures for now

(imported from commit dba079d444d40e36c91508b86b243bdc805c6222)
This commit is contained in:
Keegan McAllister 2012-10-11 21:45:22 -04:00
parent b1cafb2761
commit d19d3d2bd7
1 changed files with 5 additions and 1 deletions

View File

@ -223,7 +223,11 @@ class Message(models.Model):
content = self.heading_regex.sub(r' \1', self.content)
with_links = self.link_regex.sub(linkify, content)
try:
return md_engine.convert(with_links)
except:
# FIXME: Do something more reasonable here!
return '<p>[Humbug note: Sorry, we could not understand the formatting of your message]</p>'
@cache_with_key(lambda self, apply_markdown: 'message_dict:%d:%d' % (self.id, apply_markdown))
def to_dict(self, apply_markdown):