Ticket #6526: 6526-markdown-with-options-for-safe-mode.diff
File 6526-markdown-with-options-for-safe-mode.diff, 948 bytes (added by , 16 years ago) |
---|
-
django/contrib/markup/templatetags/markup.py
60 60 # to fully support extensions before 1.6b was the shortlived 1.6a. 61 61 if hasattr(markdown, 'version'): 62 62 extensions = [e for e in arg.split(",") if e] 63 if len(extensions) > 0 and extensions[0] == "safe": 63 if len(extensions) > 0 and extensions[0] in ('safe','replace','remove','escape'): 64 # using True for compatibility reason 65 if extensions[0] == 'safe': 66 safe_mode = True 67 else: 68 safe_mode = extensions[0] 64 69 extensions = extensions[1:] 65 safe_mode = True66 70 else: 67 71 safe_mode = False 68 72