Skip to content

Commit

Permalink
[#1747] Swap logic to remove not and aid readability
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Jun 16, 2014
1 parent 8fb491e commit ddd5a44
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ckan/lib/helpers.py
Expand Up @@ -1613,11 +1613,11 @@ def render_markdown(data, auto_link=True, allow_html=False):
'''
if not data:
return ''
if not allow_html:
if allow_html:
data = markdown(data, safe_mode=False)
else:
data = RE_MD_HTML_TAGS.sub('', data.strip())
data = markdown(data, safe_mode=True)
else:
data = markdown(data, safe_mode=False)
# tags can be added by tag:... or tag:"...." and a link will be made
# from it
if auto_link:
Expand Down

0 comments on commit ddd5a44

Please sign in to comment.