Extension Fenced Code Blocks breaks HTML formatting on quotes in attributes · Issue #1247 · Python-Markdown/markdown (original) (raw)

The extension fenced code blocks (https://python-markdown.github.io/extensions/fenced_code_blocks/#attributes) breaks the HTML formatting when a language, id or class contains a quotation-mark (").

https://github.com/Python-Markdown/markdown/blob/master/markdown/extensions/fenced_code.py#L122-L127

The following snippet

``` { .">outside}

will render as
outside">

```

Even though the users of Python-Markdown are responsible for sanitizing / escaping the end-result, this might lead to some unintended behaviour (as seen in netbox-community/netbox#9292).