Sanitize database input