Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Ckeditor 输入文本,我想将该文本保存在数据库中,但是当我在编辑器中编写文本并且我想将它保存在数据库中时,出现了这个错误。
从客户端检测到有潜在危险的 Request.Form 值(editor1="
这是我的代码:
M.Body = editor1.Value;
我想保存文本的字段是 Body,我使用 LINQ to SQL 与数据库建立关系。
如何使用此编辑器将文本保存在数据库中?
尝试编码您的 CKEditor HTML 输出。将此添加到您的 CKEditor 声明中:
oCKeditor.Config['HtmlEncodeOutput'] = true;
有关您在ASP.NET 网站上遇到的错误的更多信息