Fix #1943: escape class names
Updated tests for #1943: escape class names