Ticket #6387: markdown-1.7-support.diff
File markdown-1.7-support.diff, 965 bytes (added by , 17 years ago) |
---|
-
django/contrib/markup/templatetags/markup.py
65 65 safe_mode = True 66 66 else: 67 67 safe_mode = False 68 return mark_safe(force_unicode(markdown.markdown(smart_str(value), extensions, safe_mode=safe_mode))) 68 69 # markdown 1.7 was the first to add proper unicode support 70 if markdown.version_info < (1,7): 71 return mark_safe(force_unicode(markdown.markdown(smart_str(value), extensions, safe_mode=safe_mode))) 72 else: 73 return mark_safe(markdown.markdown(force_unicode(value), extensions, safe_mode=safe_mode)) 69 74 else: 70 75 return mark_safe(force_unicode(markdown.markdown(smart_str(value)))) 71 76 markdown.is_safe = True