Search code examples
pandochtml-escape-characters

Pandoc: escape HTML option


While other markdown implementations have a switch to escape HTML, I couldn't find one for Pandoc.

I want Pandoc to convert HELLO <blink>WORLD</blink> to <p>HELLO &lt;blink>WORLD&lt;/blink></p>.

Kramdown and Maruku don't seem to support this, how about Pandoc?


Solution

  • You can disable the extension raw_html by using this command to compile:

    pandoc -f markdown-raw_html -t html
    

    Although the output does not exactly matches your expected output because it will also transform > to &gt;.