Skip to content

Commit caa0c1e

Browse files
committed
Removed mention of removed features from docs.
1 parent 9caf6d7 commit caa0c1e

File tree

2 files changed

+2
-62
lines changed

2 files changed

+2
-62
lines changed

docs/cli.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ The `--extension_configs` option will only support YAML configuration files if [
140140
installed on your system. JSON should work with no additional dependencies. The format
141141
of your configuration file is automatically detected.
142142

143-
!!!warning
144-
The previously documented method of appending the extension configuration options as a string to the
145-
extension name will be deprecated in Python-Markdown version 2.6. The `--extension_configs`
146-
option should be used instead. See the [2.5 release notes] for more information.
147-
148143
[ec]: reference.html#extension_configs
149144
[YAML]: http://yaml.org/
150145
[JSON]: http://json.org/

docs/reference.txt

Lines changed: 2 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ The following options are available on the `markdown.markdown` function:
8686

8787
If an extension name is provided as a string, the extension must be
8888
importable as a python module on your PYTHONPATH. Python's dot notation is
89-
supported. Therefore, to import the 'extra' extension, one could do
89+
required. Therefore, to import the 'extra' extension, one could do
9090
`extensions=['markdown.extensions.extra']`
9191

9292
Additionally, a Class may be specified in the name. The class must be at the end of
@@ -102,7 +102,7 @@ The following options are available on the `markdown.markdown` function:
102102

103103
!!! note
104104
You should only need to specify the class name if more than one extension
105-
is definedwithin the same module. The extensions that come with
105+
is defined within the same module. The extensions that come with
106106
Python-Markdown do *not* need to have the class name specified. However,
107107
doing so will not effect the behavior of the parser.
108108

@@ -163,61 +163,6 @@ The following options are available on the `markdown.markdown` function:
163163
`"html4"`) be used as the more general formats (`"xhtml"` or `"html"`) may
164164
change in the future if it makes sense at that time.
165165

166-
* __`safe_mode`__{: #safe_mode }: Disallow raw HTML.
167-
168-
!!! warning
169-
"`safe_mode`" is deprecated and should not be used.
170-
171-
HTML sanitizers (like [Bleach]) provide a better solution for
172-
dealing with markdown text submitted by untrusted users.
173-
174-
import markdown
175-
import bleach
176-
html = bleach.clean(markdown.markdown(untrusted_text))
177-
178-
See the [release notes] for more info.
179-
180-
[Bleach]: https://github.com/jsocol/bleach
181-
[release notes]: release-2.6.html
182-
183-
The following values are accepted:
184-
185-
* `False` (Default): Raw HTML is passed through unaltered.
186-
187-
* `replace`: Replace all HTML blocks with the text assigned to
188-
`html_replacement_text` To maintain backward compatibility, setting
189-
`safe_mode=True` will have the same effect as `safe_mode='replace'`.
190-
191-
To replace raw HTML with something other than the default, do:
192-
193-
md = markdown.Markdown(safe_mode='replace',
194-
html_replacement_text='--RAW HTML NOT ALLOWED--')
195-
196-
* `remove`: All raw HTML will be completely stripped from the text with
197-
no warning to the author.
198-
199-
* `escape`: All raw HTML will be escaped and included in the document.
200-
201-
For example, the following source:
202-
203-
Foo <b>bar</b>.
204-
205-
Will result in the following HTML:
206-
207-
<p>Foo &lt;b&gt;bar&lt;/b&gt;.</p>
208-
209-
!!! Note
210-
"safe_mode" also alters the default value for the
211-
[`enable_attributes`](#enable_attributes) option.
212-
213-
214-
* __`html_replacement_text`__{: #html_replacement_text }: Text used when
215-
safe_mode is set to `replace`. Defaults to `[HTML_REMOVED]`.
216-
217-
!!! warning
218-
"`html_replacement_text`" is deprecated and should not be used.
219-
See the [release notes] for more info.
220-
221166
* __`tab_length`__{: #tab_length }: Length of tabs in the source. Default: 4
222167

223168
* __`enable_attributes`__{: #enable_attributes}: Enable the conversion of

0 commit comments

Comments
 (0)