One point in and its already dead wrong, you never filter input, only output. Edit: Everyone talking about databases: paramaterized queries, check them out.
SQL injection attacks alone are almost always a result of not filtering input...
SQL injection occurs when you're not escaping data while producing output, namely, an SQL query sent to the DB.
XSS attacks occur when you're not escaping data while producing HTML, but you don't need angle brackets to do it. allows for XSS injection with just a quote character. Header injection attacks occur when you're not escaping data while producing HTTP/MIME headers, and all you need is a line-break character. The escaping always depends on the output context, and the data in the database cannot be made safe for all these contexts. You will still need to allow people named "O'Brian", let people post "<_<" smileys, use Unicode in their names, etc.