Strip out invalid characters.