From e9fe9c3516d434d3e10a55ad30399a2f42c6363a Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 5 Dec 2012 05:35:17 -0500 Subject: Fixed #160. No `markdown=1` support in safe_mode. When in safe_mode, there is no raw html to contain `markdown=1` for processing, so there is no need to turn on that feature. The symptom reported in issue #160 appears to be a side effect of commit a2377e1129331430998de821ed3abf38247edca1. --- markdown/extensions/extra.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/markdown/extensions/extra.py b/markdown/extensions/extra.py index 2c7915e..ba646f5 100644 --- a/markdown/extensions/extra.py +++ b/markdown/extensions/extra.py @@ -45,8 +45,9 @@ class ExtraExtension(markdown.Extension): def extendMarkdown(self, md, md_globals): """ Register extension instances. """ md.registerExtensions(extensions, self.config) - # Turn on processing of markdown text within raw html - md.preprocessors['html_block'].markdown_in_raw = True + if not md.safeMode: + # Turn on processing of markdown text within raw html + md.preprocessors['html_block'].markdown_in_raw = True def makeExtension(configs={}): return ExtraExtension(configs=dict(configs)) -- cgit v1.2.3