diff --git a/ckan/lib/helpers.py b/ckan/lib/helpers.py index 3c4477e7163..bf42584359c 100644 --- a/ckan/lib/helpers.py +++ b/ckan/lib/helpers.py @@ -866,7 +866,7 @@ def markdown_extract(text, extract_length=190): ''' return the plain text representation of markdown encoded text. That is the texted without any html tags. If extract_length is 0 then it will not be truncated.''' - if (text is None) or (text.strip() == ''): + if not text: return '' plain = RE_MD_HTML_TAGS.sub('', markdown(text)) if not extract_length or len(plain) < extract_length: