aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaylan Limberg <waylan@gmail.com>2012-12-05 05:35:17 -0500
committerWaylan Limberg <waylan@gmail.com>2012-12-05 05:35:17 -0500
commite9fe9c3516d434d3e10a55ad30399a2f42c6363a (patch)
tree8cbff3cf2324299626ef99bfe7bc8ab3199d192e
parentb7301555e2182b52fb88e259189c9a5d0532ca81 (diff)
downloadmarkdown-e9fe9c3516d434d3e10a55ad30399a2f42c6363a.tar.gz
markdown-e9fe9c3516d434d3e10a55ad30399a2f42c6363a.tar.bz2
markdown-e9fe9c3516d434d3e10a55ad30399a2f42c6363a.zip
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.
-rw-r--r--markdown/extensions/extra.py5
1 files 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))