I already know how XSS works, but finding out all the many different ways to inject malicious input is not an option.
I saw a couple libraries out there, but most of
OWASP offers an encoding library, on which time has been spent to handle the various cases.
Obsolete: http://www.owasp.org/index.php/Category:OWASP_Encoding_Project Now at http://code.google.com/p/reform/ and OWASP's antiXSS specific library is at: http://code.google.com/p/php-antixss/