sanitize_domain function

Sanitize domain input