【发布时间】:2011-03-06 02:28:27
【问题描述】:
我正在考虑在我的项目中使用 WMD,而不是我现有的 RadEditor。我已经阅读了一些关于如何存储和检索数据的帖子,我想在继续之前确保我的概念是正确的。
如果我的研究是正确的,这就是我应该做的。
- 我应该将编辑器数据存储两次(一次是 HTML,一次是 Markdown)
- 我应该在存储之前通过Whitelist 运行 HTML。
- 我应该在退出时(显示之前)通过 AntiXSS 运行 HTML
- 我应该只使用 Markdown 数据来重新填充 Markdown 进行编辑。
任何人都可以确认或否认这是否正确,并就该主题添加任何有用的输入?
参考
Reformat my code: Sanitize Html
StackOverflow: how do you store the markdown using wmd in asp net
StackOverflow: sanitize html before storing in the db or before rendering antixss library
StackOverflow: store html entities in database or convert when retrieved
【问题讨论】:
标签: .net asp.net-mvc markdown antixsslibrary