Skip to content
Browse files

I guess it's all right in this way

  • Loading branch information...
1 parent 4047b54 commit 4a93c70545e1b2193c8bacb9a5ac692f97bc0a0c @Alir3z4 committed Jan 25, 2013
Showing with 6 additions and 12 deletions.
  1. +6 −12 django_markwhat/templatetags/markup.py
View
18 django_markwhat/templatetags/markup.py
@@ -63,18 +63,12 @@ def markdown(value, args=''):
else:
safe_mode = False
- if safe_mode:
- return mark_safe(markdown.markdown(
- force_unicode(value),
- extensions,
- safe_mode=safe_mode,
- enable_attributes=False
- ))
- else:
- return mark_safe(markdown.markdown(
- force_unicode(value),
- extensions,safe_mode=safe_mode
- ))
+ return mark_safe(markdown.markdown(
+ force_unicode(value),
+ extensions,
+ safe_mode=safe_mode,
+ enable_attributes=(not safe_mode)
+ ))
@register.filter(is_safe=True)
def restructuredtext(value):

0 comments on commit 4a93c70

Please sign in to comment.
Something went wrong with that request. Please try again.