KindEditor富文本编辑器, 从客户端中检测到有潜在危险的 Request.Form 值
2015-04-15 10:08
218 查看
在用富文本编辑器时经常会遇到的问题是asp.net报的”检测到有潜在危险的 Request.Form 值“一般的解法是在aspx页面 page 标签中加上 validaterequest='false' 但这样的话 既不安全
也不一定有效,好吧,说说我的解决方法吧, 就是在提交的时候不让富文本的内容提交,先是把内容编码给到一个隐藏标签,然后给富文本赋空值。
View Code
也不一定有效,好吧,说说我的解决方法吧, 就是在提交的时候不让富文本的内容提交,先是把内容编码给到一个隐藏标签,然后给富文本赋空值。
KindEditor.ready(function (K) { Editor = K.create('#txtIntroduction', { items: [ 'bold', 'italic', 'underline', '|', 'insertorderedlist', 'insertunorderedlist', '|', 'image', '|', 'forecolor', 'hilitecolor', 'fontname', 'fontsize', '|', 'source' ], uploadJson: '../../Scripts/kindeditor/uploadpic.aspx', afterCreate: function () { this.sync(); }, afterBlur: function () { this.sync(); }, afterChange: function () { this.sync(); } }); }); }); function AddCheck() { $("#hdIntroduction").val(escape(Editor.html())); $('#txtIntroduction').val(""); Editor.html(""); } <asp:Button ID="btnsave" Text="保存设置" runat="server" OnClick="btnsave_Click" OnClientClick="return AddCheck();" />
View Code
相关文章推荐
- 从客户端中检测到有潜在危险的 Request.Form 值-解决方案
- 从客户端(content="<p> &nb...")中检测到有潜在危险的 Request.Form 值。
- 使用FTB的时候出错从客户端(WebHtmlEditor1=" ...")中检测到有潜在危险的 Request.Form 值。
- .NET 关于从客户端(...)中检测到有潜在危险的Request.Form 值的处理办法 找不到方法:System.Web.UnvalidatedRequestValues报错的处理方案(待完善)
- 从客户端(content="<span class="Apple-s...")中检测到有潜在危险的 Request.Form 值。
- 从客户端(......)中检测到有潜在危险的 Request.Form 值
- 从客户端中检测到有潜在危险的 Request.Form 值
- WebServcies 调用方法异常:System.Web.HttpRequestValidationException: 从客户端中检测到有潜在危险的 Request.Form 值。
- 从客户端中检测到有潜在危险的Request.Form 值
- 从客户端中检测到有潜在危险的 Request.Form 值
- 错误:从客户端(Content="<IMG src="...")中检测到有潜在危险的 Request.Form 值
- ASP.NET MVC4(Razor)从客户端中检测到有潜在危险的 Request.Form 值
- 从客户端中检测到有潜在危险的 Request.Form 值
- ASP.NET MVC4(Razor)从客户端中检测到有潜在危险的 Request.Form 值
- 关闭安全检测,从客户端中检测到有潜在危险的Request.Form 值
- 从客户端(content1="<img src="/web/news/...")中检测到有潜在危险的 Request.Form 值。
- 从客户端中检测到有潜在危险的 Request.Form 值的详细解决方法
- asp.net mvc从客户端中检测到有潜在危险的 Request.Form 值
- 从客户端中检测到有潜在危险的 Request.Form 值。
- 关于从客户端中检测到有潜在危险的 Request.Form 值的最优解决方案