Earlier this year I wrote a blog post about Anti-XSS Library v1.0. Well, it's been updated with new methods to escape other kinds of data. You should start at the landing page.