Sanitize input for configuration settings.