Closed Laefy closed 6 years ago
Ok, thanks for the link. What about adding the part of code they propose ?
from markdown.extensions import Extension
class EscapeHtml(Extension): def extendMarkdown(self, md, md_globals): del md.preprocessors['html_block'] del md.inlinePatterns['html']
Because currently, if you pass this text to a Markdown converter (such as dillinger) : | A | D |
---|---|---|
B | C | |
E | <F> |
the second cell shows "<i>D</i>", not "D", and the last cell shows "<F>", not "".
After looking at it closer, it seems that by default, the recommonmark parser also treat <...> as html tags. Docs I've found on Markdown also seem to go this way. The only way to make it be parsed as < is to put a space after it, or to escape it with <. So this pull request does not seem to be justified. Thanks and sorry !
Thanks for the feedback, but I don't think this is a great idea:
safe_mode
is already deprecated by markdown: https://github.com/Python-Markdown/markdown/blob/de9cc42f2d8bc29d8f16058a6ae65a434caab7d6/docs/change_log/release-2.6.md#safe_mode-deprecated