Fix special characters in character classes.