If you write php code you are (or should be) aware of cross site scripting attacks and how vulnerable form processing can be. What countermeasures do you use. Post your functions (or links to) in this thread. I will kick it off with a a function I use regularly.