Here's some JavaScript that I use to remove HTML tags:
var vRx = new RegExp("<(.|\n)+?>", "ig");
if (vRx.test("[your text]"))
// found means its an error
else
// its OK
Embed this into a custom validator's client-side function.
--- Peter Blum
www.PeterBlum.com
Email:
PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"Rakesh" <ra***********@hotmail.com> wrote in message
news:0A**********************************@microsof t.com...
Im using a cutom control to try to validate a text box to ensure that on
the client side a validation expression is present to prevent the user from
posting back html in their text box. I was only partially successful with
some of the regular expressions i came up with. There are a few contraints.
There can be no roundtrip to the server. The server process halts reports
possible dangerous Html. Ive thought about using javascript to combat the
problem. Any suggestions???