从客户端(content="...safas
asf<scrip>")中检测到有潜在危险的 Request.Form 值。

        [Column(TypeName="ntext")]
        [MaxLength]
        [UIHint("Kindeditor")]
        [Required(ErrorMessage = "内容不能为空")]
        [AllowHtml]
        public string Content { get; set; }

在Model里添加[AllowHtml]即可以避免此问题
注意引用:using System.Web.Mvc;

 

相关文章:

  • 2022-12-23
猜你喜欢
  • 2022-01-23
  • 2021-09-22
  • 2021-07-10
相关资源
相似解决方案