【发布时间】:2012-07-17 16:03:25
【问题描述】:
我有一个 MVC3 C# .Net Web 应用程序。我们正在使用 CKEditor。我们将 CKEditor HTML 保存到数据库中的字段。插入时我们正在转义 HTML。即
<strong> Effort estimated for the subtask elements</strong>
变成
<strong> Effort estimated for the subtask elements </strong>
这工作正常。但是,在加载视图后在下拉 onchange 事件上重新发布视图时,出现以下错误。
System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (TextBoeSbTkDescription="<p>
<strong>Exampl...").
加载页面时,文本框中的值会从转义的 HTML 转换为非转义的。我在我的控制器动作中设置了一个断点,但在上述错误在 IE 中被删除之前它没有被执行。有什么想法可以解决这个问题吗?
【问题讨论】:
标签: html asp.net-mvc-2 save ckeditor