Posted on: 2/28/2014 2:14:26 PM | Views : 665

I let the user paste  text into a textbox. The text could be poetry, a screenplay, a mathematical lecture, etc.
The problem is that if he has a html tag in it, the page gives the error "a potentially dangerous request.form value ..."
I thought I could handle this by putting some lines in the web.config to redirect to a custom error page, but it turns out that catching the Xss error interfers with Microsoft Chart controls that I have.  (if thats true, thats a Microsoft bug).
So I tried something else: I put "errorpage='complain.aspx' in the page directive.
That did not help though, the error "potentially dangerous request.form value" still appeared.
So I'd like to cope with this, and also, that leads to another question.  There is a simple library that strips out html tags that I could let my user use.  Its somewhat clumsy, because it would also strip out something like  " if 5 ...

Go to the complete details ...