markdown.extensions.md_in_html fails to escape HTML tags in monospace text placed inside a markdown="1" div wrapper:
>>> import markdown
>>> markdown.markdown('<div markdown="1">\n`<h1>escaped</h1>`\n</div>', extensions=["markdown.extensions.md_in_html"])
'<p><h1><div markdown="block">\n`escaped</h1>`\n</div></p>'
<p><h1><div markdown="block">
`escaped</h1>`
</div></p>
The inner <code> element should look like this: <code><h1>escaped</h1></code>, but instead the h1 inside the monospace text appears as an actual <h1> tag in the output.
Versions
- Markdown==3.3.3
- CPython 3.8.6
markdown.extensions.md_in_htmlfails to escape HTML tags inmonospacetext placed inside amarkdown="1"div wrapper:The inner
<code>element should look like this:<code><h1>escaped</h1></code>, but instead the h1 inside themonospacetext appears as an actual<h1>tag in the output.Versions