News for hackers. Stuff that matters.
Re:You Suck (On web apps that mismanage text) by jcromartie on Friday March 19, 2010 @10:27AM (#1204186)
For any "human" data: trim and escape, and you're done. If you want to validate it, just ask the party that knows for sure (send an email, run a transaction, visit the URL).

This includes names, addresses, phone numbers, emails, URLs, CC/account numbers, user names, passwords (maybe tell them that caps-lock is on or any other weird keyboard state if you can).

Re:You Suck (On web apps that mismanage text) by DougBTX on Saturday March 20, 2010 @11:13AM (#1206459)
As long as you wait until you know where the data is going, escaping is always a good idea.