Markdown.jl icon indicating copy to clipboard operation
Markdown.jl copied to clipboard

Escape special characters

Open mpastell opened this issue 10 years ago • 1 comments

Markdown.jl should escape special characters. Currently I get:

julia> input = """
              `<tag>`
              """
"`<tag>`\n"

julia> output = stringmime("text/html", Markdown.parse(input))
"<div class=\"markdown\">\n<p><code><tag></code></p>\n</div>\n"

which does not work render well browsers. It's fairly easy to fix this for code blocks replacing < with &lt; etc, but if you wan't to support inline HTML in paragraphs then it takes more work.

mpastell avatar Jan 02 '15 15:01 mpastell

This is fixed in https://github.com/JuliaLang/julia/pull/10061 (so should be in 0.4 and hopefully the next Markdown.jl release).

hayd avatar Mar 12 '15 19:03 hayd