Skip to content

Commit

Permalink
[#708] Get markdown_extract() to use RE_MD_HTML_TAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Apr 2, 2013
1 parent 2c8977e commit f647c69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/helpers.py
Expand Up @@ -636,7 +636,7 @@ def markdown_extract(text, extract_length=190):
will not be truncated.'''
if (text is None) or (text.strip() == ''):
return ''
plain = re.sub(r'<.*?>', '', markdown(text))
plain = RE_MD_HTML_TAGS.sub('', markdown(text))
if not extract_length or len(plain) < extract_length:
return literal(plain)
return literal(unicode(truncate(plain, length=extract_length, indicator='...', whole_word=True)))
Expand Down

0 comments on commit f647c69

Please sign in to comment.