CodeYun
CodeYun

Reputation: 749

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

In my Asp.net MVC 1.0 application I want to use CKEditor 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.

Upvotes: 1

Views: 450

Answers (1)

AlfonsoML
AlfonsoML

Reputation: 12690

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

Upvotes: 1

Related Questions