aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/markdown/__init__.py b/markdown/__init__.py
index 3100901..629d5b7 100644
--- a/markdown/__init__.py
+++ b/markdown/__init__.py
@@ -122,6 +122,10 @@ class Markdown:
setattr(self, option, kwargs.get(option, default))
self.safeMode = kwargs.get('safe_mode', False)
+ if self.safeMode and not kwargs.has_key('enable_attributes'):
+ # Disable attributes in safeMode when not explicitly set
+ self.enable_attributes = False
+
self.registeredExtensions = []
self.docType = ""
self.stripTopLevelTags = True