Konstantin Obenland has posted some tips for proper validation and sanitization on the Themeshaper blog. For those that recall Otto’s definitive post on the subject, this one adds a couple of tips in addition that have been added to core since Otto’s post. This is a handy post for theme developers.