When you insert user supplied information from a form(text, textarea) and insert into a database, what is the best method for keeping HTML, hacks and other crap from being inserted?
I'm currently using URLEncodedFormat to convert the info before insert and URLDecode during output.
I really don't want to do a Replace(crap, "XXXX", "all"
.
What is best practice for this?
Thanks!
I'm currently using URLEncodedFormat to convert the info before insert and URLDecode during output.
I really don't want to do a Replace(crap, "XXXX", "all"
What is best practice for this?
Thanks!