gpt4 book ai didi

c# - TinyMCE 编辑器 : A potentially dangerous Request. 从客户端检测到表单值

转载 作者:太空狗 更新时间:2023-10-29 20:25:06 27 4
gpt4 key购买 nike

我有 aspx,因为我正在调用 ascx 用户控件,因为我正在使用 tinymce 编辑器。当我尝试保存数据时出现错误..

从客户端(UserControl1$TextBox1="

fgh

fghj

我已经检查了A potentially dangerous Request.Form value was detected from the client

我试过:

我设置的web.config

<pages validateRequest="false">
<httpRuntime requestValidationMode="2.0" requestPathInvalidCharacters=""/>
<compilation debug="true" targetFramework="4.0">
<@page validateRequest="false">
Server.HtmlEncode(TextBox1.Text)
encoding: "xml" // This is solving the prob. but Text is converting in HTML tag I don't want that

请有人帮助我...

最佳答案

您也可以尝试添加编码属性:encoding: 'xml'

<script>
tinymce.init({
selector: 'textarea',
encoding: 'xml'
});
</script>

你可以查看这个link ,它说:

encoding: “xml”

– solves “A potentially dangerous Request.Form value was detected”, which won’t allow you to submit the Web Form

关于c# - TinyMCE 编辑器 : A potentially dangerous Request. 从客户端检测到表单值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9429250/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com