Fix cleaned_markdown_conversion so that it doesn't bork on empty strings
Basically, clean_html would throw an error on '', so we just return '' "if not text"
This commit is contained in:
parent
5c441e75eb
commit
8268884653
@ -383,6 +383,11 @@ def cleaned_markdown_conversion(text):
|
|||||||
"""
|
"""
|
||||||
Take a block of text, run it through MarkDown, and clean its HTML.
|
Take a block of text, run it through MarkDown, and clean its HTML.
|
||||||
"""
|
"""
|
||||||
|
# Markdown will do nothing with and clean_html can do nothing with
|
||||||
|
# an empty string :)
|
||||||
|
if not text:
|
||||||
|
return u''
|
||||||
|
|
||||||
return clean_html(MARKDOWN_INSTANCE.convert(text))
|
return clean_html(MARKDOWN_INSTANCE.convert(text))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user