Why isn't MarkdownSharp encoding my HTML?

后端 未结 3 1395
野趣味
野趣味 2021-02-20 14:48

In my mind, one of the bigger goals of Markdown is to prevent the user from typing potentially malformed HTML directly.

Well that isn\'t exactly working for me in Markdo

3条回答
  •  梦毁少年i
    2021-02-20 15:52

    Since it became clear that the StackOverflow implementation contains quite a few customizations that could be time consuming to test and figure out, I decided to go another direction.

    I created my own simplified markup language that's a subset of Markdown. The open-source project is at http://ultralight.codeplex.com/ and you can see a working example at http://www.bucketsoft.com/ultralight/

    The project is a complete ASP.NET MVC solution with a Javascript editor. And unlike MarkdownSharp, safe HTML is guaranteed. The Javascript parser is used both client-side and server-side to guarantee consistent markup (special thanks to the Jurassic Javascript compiler). It's a beautiful thing to only have to maintain one codebase for that parser.

    Although the project is still in beta, I'm using it on my own site already and it seems to be working well so far.

提交回复
热议问题