aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/core.py')
-rw-r--r--markdown/core.py24
1 files changed, 1 insertions, 23 deletions
diff --git a/markdown/core.py b/markdown/core.py
index e92aad0..7d9d839 100644
--- a/markdown/core.py
+++ b/markdown/core.py
@@ -2,8 +2,8 @@ from __future__ import absolute_import
from __future__ import unicode_literals
import codecs
import sys
-import logging
import warnings
+import logging
import importlib
from . import util
from .preprocessors import build_preprocessors
@@ -65,10 +65,6 @@ class Markdown(object):
Note that it is suggested that the more specific formats ("xhtml1"
and "html4") be used as "xhtml" or "html" may change in the future
if it makes sense at that time.
- * safe_mode: Deprecated! Disallow raw html. One of "remove", "replace"
- or "escape".
- * html_replacement_text: Deprecated! Text used when safe_mode is set
- to "replace".
* tab_length: Length of tabs in the source. Default: 4
* enable_attributes: Enable the conversion of attributes. Default: True
* smart_emphasis: Treat `_connected_words_` intelligently Default: True
@@ -80,24 +76,6 @@ class Markdown(object):
for option, default in self.option_defaults.items():
setattr(self, option, kwargs.get(option, default))
- self.safeMode = kwargs.get('safe_mode', False)
- if self.safeMode and 'enable_attributes' not in kwargs:
- # Disable attributes in safeMode when not explicitly set
- self.enable_attributes = False
-
- if 'safe_mode' in kwargs:
- warnings.warn('"safe_mode" is deprecated in Python-Markdown. '
- 'Use an HTML sanitizer (like '
- 'Bleach https://bleach.readthedocs.io/) '
- 'if you are parsing untrusted markdown text. '
- 'See the 2.6 release notes for more info',
- DeprecationWarning)
-
- if 'html_replacement_text' in kwargs:
- warnings.warn('The "html_replacement_text" keyword is '
- 'deprecated along with "safe_mode".',
- DeprecationWarning)
-
self.ESCAPED_CHARS = ['\\', '`', '*', '_', '{', '}', '[', ']',
'(', ')', '>', '#', '+', '-', '.', '!']