evilstreak / markdown-js

A Markdown parser for javascript
7.69k stars 863 forks source link

Inline HTML #279

Closed jkurei closed 7 years ago

jkurei commented 7 years ago

Gruber's Markdown supports embedded HTML tags inside Markdown (https://daringfireball.net/projects/markdown/syntax#html), but this library just shows the HTML as plain text.

I understand this may not be an easy feature to implement, or at least not safely, but since it is a feature in Gruber's specification, README.md should warn this is not supported.

Example, using the example code in README.md:

screen shot 2016-10-17 at 12 59 48

(I'm not sure that span to change the color should work, but even ignoring the styling the HTML tag should no appear; that table definitely should work)

urosjarc commented 7 years ago

This feature is a MUST.

ashb commented 7 years ago

If someone writes this feature, and it has tests, and can be disabled in some manner then I'll happily merge it.

sir-ragna commented 7 years ago

Someone made a pull request for this. https://github.com/evilstreak/markdown-js/pull/98

kpcyrd commented 7 years ago

Please don't enable this by default, as you are probably introducing security issues for all your dependents if you do. 👎

html in markdown is nice if you're the only person using it, but a complete disaster for applications using markdown to render comments like github does. And, no, "safe html" is just asking for somebody to come up with a clever way to break it.

ashb commented 7 years ago

Closing as duplicate of #98 where there's been more dicussion.