3 ms·
Many markdown parsers allow inline html. In some languages, it’s most of them. Only a few let you turn it off. So stupid.
by hinkley 3y ago
Many markdown parsers allow inline html. In some languages, it’s most of them. Only a few let you turn it off. So stupid.
- zokier 3y agoFor better or worse, inline HTML was key part of original markdown spec: > For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags. > If you want, you can even use HTML tags instead of Markdown formatting; e.g. if you’d prefer to use HTML <a> or <img> tags instead of Markdown’s link or image syntax, go right ahead. Markdown was not really intended as standalone markup format, instead it was more just a tool for authoring HTML > Markdown’s syntax is intended for one purpose: to be used as a format for writing for the web.
- cdcarter 3y agoWell, the markdown specification allows inline HTML, so that's to be expected. But it's true if you're taking user input as markdown and display it as rendered HTML, you need to think very carefully about escaping and sanitization.