diff --git a/freepost/__init__.py b/freepost/__init__.py index 7958ca7..60a9b36 100755 --- a/freepost/__init__.py +++ b/freepost/__init__.py @@ -33,6 +33,9 @@ template = functools.partial ( 'ago': lambda date: timeago.format (date), 'datetime': lambda date: date.strftime ('%b %-d, %Y - %H:%M%p%z%Z'), 'title': lambda date: date.strftime ('%b %-d, %Y - %H:%M%z%Z'), + # Convert markdown to plain text + 'md2txt': lambda text: bleach.clean (markdown.markdown (text), + tags=[], attributes={}, styles=[], strip=True), # Convert markdown to html 'md2html': lambda text: bleach.clean (markdown.markdown ( text, diff --git a/freepost/templates/homepage.html b/freepost/templates/homepage.html index fee6def..5d2a3c6 100755 --- a/freepost/templates/homepage.html +++ b/freepost/templates/homepage.html @@ -29,7 +29,7 @@ {% if post.text %} {% endif %}