Handle illegal identifier characters that can appear in discovery docs