A "generic" untainting is always a bad idea. Either use tainting, or don't use it. If you're gonna untaint nearly everything anyway with no pattern checking that is domain specific, just turn tainting off.
Bad idea. Definitely bad idea.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.