added handling of HTML entities
fixed tests for HTML entities and handling of HTML entities