views:

38

answers:

1

I am using TinyMce on my asp.net web site for comment posting.
I want to make sure that the input is safe before I insert it into DB.

The TinyMce does it's own HTML encoding on client side.
In my other question people suggested that encoding should be done on the server side and not on client side.

What can I use on server side to make sure that input is safe?
I can't just use HttpServerUtility.HtmlEncode Method because it will ruin TinyMce's content.

A: 

Check out the Microsoft Web Protection Library on Codeplex which has AntiXSS and HtmlSanitization capabilities in order to "clean" your html.

Mikael Svenson