Skip to content

Commit

Permalink
Merge pull request #582 from okfn/582-fix-markdown_extract
Browse files Browse the repository at this point in the history
h. markdown_extract() & < > issue [2.0]
  • Loading branch information
johnmartin committed Mar 12, 2013
2 parents 33bbfba + b7e06e1 commit ea27c01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/helpers.py
Expand Up @@ -614,7 +614,7 @@ def markdown_extract(text, extract_length=190):
return ''
plain = re.sub(r'<.*?>', '', markdown(text))
if not extract_length or len(plain) < extract_length:
return plain
return literal(plain)
return literal(unicode(truncate(plain, length=extract_length, indicator='...', whole_word=True)))


Expand Down

0 comments on commit ea27c01

Please sign in to comment.