开发者

How to prevent script attact in ASP.net MVC project which uses CKEditor?

开发者 https://www.devze.com 2022-12-22 05:21 出处:网络
In my Asp.net MVC 1.0 application I want to use C开发者_如何学运维KEditor as my Rich Text Editor. But if I want to use this editor i have to Disable Request Validation . After doing this if I want to

In my Asp.net MVC 1.0 application I want to use C开发者_如何学运维KEditor as my Rich Text Editor. But if I want to use this editor i have to Disable Request Validation . After doing this if I want to display the whole html content directly I can't use HTML.Encode() becuase I want to render the real html content generated from Editor.

So how can we prevent the potential attact from this change.


You can use the htmlEncodeOutput option or use a .Net wrapper like this one: http://cksource.com/forums/viewtopic.php?f=11&t=15882

0

精彩评论

暂无评论...
验证码 换一张
取 消