Support whitelisting for input sanitization

Whitelisting covers sanitization only. Validation can't be whitelisted away.

Fixes #293