[C# asp.net mvc or javascript] user-friendly xml sensitization library that html encoding invalid pa
- by Fox
I would like to allow my users to submit a subset of xhtml that will be displayed to other users (likely I'll build a schema for it) but I want the server to handle validation more gracefully then hard rejecting invalid submissions.... Instead I'd like the server to Html Encode invalid/harmful parts of the submissions.... (sanitize javascript and css etc.)
Is there any library (maybe asp.net mvc 2 has such functionality?) or do I have to develop my own?
or maybe there is a javascript library that html encodes invalid parts and I can just have the server only accept that subset?