From d959926ebd416bf8370cfab0bc910cd19670083a Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Wed, 28 Dec 2016 00:30:31 +0100 Subject: [PATCH] Precision regarding 'html_block' and EscapeHtml --- docs/release-2.6.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/release-2.6.txt b/docs/release-2.6.txt index 9a235c8e3..e8f5b5115 100644 --- a/docs/release-2.6.txt +++ b/docs/release-2.6.txt @@ -41,14 +41,17 @@ raw HTML, then that can be accomplished through an extension which removes HTML class EscapeHtml(Extension): def extendMarkdown(self, md, md_globals): - del md.preprocessors['html_block'] - del md.inlinePatterns['html'] + del md.preprocessors['html_block'] + del md.inlinePatterns['html'] html = markdown.markdown(text, extensions=[EscapeHtml()]) As the HTML would not be parsed with the above Extension, then the serializer will escape the raw HTML, which is exactly what happens now when `safe_mode="escape"`. +Please note that above ``EscapeHtml`` extension does not work with the ``extra`` +extension as it depends on the ``html_block`` preprocessor. + [Bleach]: https://bleach.readthedocs.io/ ### Positional Arguments Deprecated