x

but this unexpectedly generates invalid HTML syntax: $ echo '![x\"x](x)' | python3 -...">

Smarty extension causes generation of invalid HTML syntax · Issue #1131 · Python-Markdown/markdown (original) (raw)

This works as expected:

$ echo 'x"x' | python3 -m markdown -x smarty

x"x

but this unexpectedly generates invalid HTML syntax:

$ echo 'x\"x' | python3 -m markdown -x smarty

x

I would expect the second output to be the same as the first. Backslash should suppress special interpretation by Markdown; it should not also induce special interpretation by HTML.