Skip to content

Commit

Permalink
put back bugfix lost in recent gumbo update
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhendricks committed Mar 10, 2019
1 parent e820188 commit ebd8c7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions internal/gumbo/tokenizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,12 @@ static StateResult handle_tag_name_state(
abandon_current_tag(parser);
gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
return NEXT_CHAR;
// xml parsing rules do not allow single or double quotes in tag names
case '"':
case '\'':
tokenizer_add_parse_error(parser, GUMBO_ERR_TAG_INVALID);
append_char_to_tag_buffer(parser, '_', false);
return NEXT_CHAR;
default:
append_char_to_tag_buffer(parser, gumbo_tolower(c), true);
return NEXT_CHAR;
Expand Down

0 comments on commit ebd8c7c

Please sign in to comment.