与CKEDITOR&QUOT MVC2应用;潜在危险的Request.Form [英] MVC2 application with Ckeditor "potentially dangerous Request.Form

查看:104
本文介绍了与CKEDITOR&QUOT MVC2应用;潜在危险的Request.Form的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到用我的FCK编辑IM时异常从客户端检测到潜在危险的Request.Form请求值了。

I'm getting the "Potentially dangerous Request.Form request value was detected from the client" exception when im using my FCK editor.

怎么可能带code之前提交的形式,或者没有禁用数据Anotations验证禁用此验证?

How could encode before submit the form, or disable this validation without disable the Data Anotations validation?

这是我的看法的code:

This is the code of my view:

 <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary("Please complete in a right way the fields below.") %>

        <fieldset>
            <legend>Fields</legend>
            <div class="editor-field">
                <%: Html.LabelFor(e => e.Name)%>
                <%: Html.TextBoxFor(e => e.Name)%>
                <%: Html.ValidationMessageFor(e => e.Name)%>
            </div>
            <div class="editor-field">
                <%: Html.LabelFor(e => e.Teaser) %>
                <%: Html.TextAreaFor(e => e.Teaser)%>
                <%: Html.ValidationMessageFor(e => e.Teaser)%>
            </div>
            <div class="editor-field">
                <%: Html.LabelFor(e => e.Description) %>
                <%: Html.TextAreaFor(e => e.Description)%>
                <%: Html.ValidationMessageFor(e => e.Description)%>
            </div>
            <p>
                <input type="submit" />
            </p>
        </fieldset>

    <% } %>

<script type="text/javascript">
   //<![CDATA[
   // This call can be placed at any point after the
   // <textarea>, or inside a <head><script> in a
   // window.onload event handler.
   // Replace the <textarea id="xxxxxx"> with an CKEditor
   // instance, using default configurations.
   CKEDITOR.replace("Description");
   //]]>
</script>

非常感谢在前进。

Thanks a lot in advance.

推荐答案

&LT;的httpRuntime requestValidationMode =2.0/&GT;

检查:<一href=\"http://stackoverflow.com/questions/1648386/request-validation-asp-net-mvc-2\">http://stackoverflow.com/questions/1648386/request-validation-asp-net-mvc-2

这篇关于与CKEDITOR&QUOT MVC2应用;潜在危险的Request.Form的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆