I totally agree with Nitin. Check membership on entrance, not exit. :-)
+1 for blocking of invalid unicode at input. /Per 1 jul 2009 kl. 21.49 skrev Nitin Borwankar:
It seems backward ( I am probably missing something huge) to not validate it on input. If you catch all the bad stuff going in you're less likely (except when you're doing internal transformations) to have bad stuff there in the first place and you can save yourself validations on the way out.Nitin
