Skip to content

Commit

Permalink
correctly handle text in form elements ala nokogirl commit 73c5df2
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinhendricks committed Apr 8, 2023
1 parent 4469240 commit 20e7be7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -2986,6 +2986,9 @@ static bool handle_in_body(GumboParser* parser, GumboToken* token) {
ignore_token(parser);
return false;
}
// Since we remove the form node without popping, we need to make sure
// that we flush any text nodes at the end of the form
maybe_flush_text_node_buffer(parser);
// This differs from implicitly_close_tags because we remove *only* the
// <form> element; other nodes are left in scope.
generate_implied_end_tags(parser, GUMBO_TAG_LAST);
Expand Down

1 comment on commit 20e7be7

@kevinhendricks
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edit: my bad: make that nokogiri

Please sign in to comment.