Markdown.NET 错误地没有转义 HTML 标签
看来 Markdown.NET 并没有逃避以下内容:
<script>
这是一个问题...
是否有其他方法可以使用 ASP.NET 在服务器上从 Markdown 生成 HTML?
it seems that Markdown.NET does not escape the following:
<script>
which is kind of a problem...
Is there any other way of generating HTML from Markdown on the server with ASP.NET?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Markdown 明确允许 HTML 标记 因此:“...错误地不会转义... “不太正确。
这意味着您需要自己对其进行消毒。 如果您愿意,您甚至可以使用 Stack Overflow 的 HTML 清理工具。
Markdown explicitly allows HTML markup so: "... incorrectly does not escape ..." is not quite right.
Which means that you're on the hook for sanitizing it yourself. You could even use Stack Overflow's HTML sanitizer if you wanted to.