From b7772a44e79445d9979a44c973223338560db292 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 3 Jul 2021 03:03:32 +0200 Subject: Call tag end for void tags (such as br) --- src/HtmlParser.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/HtmlParser.c b/src/HtmlParser.c index 287f322..e0b5599 100644 --- a/src/HtmlParser.c +++ b/src/HtmlParser.c @@ -412,6 +412,11 @@ static int html_parser_parse_tag_start(HtmlParser *self) { res = self->parse_callback(self, HTML_PARSE_TAG_START, self->callback_userdata); if(res != 0) return res; + if(self->is_tag_void) { + res = self->parse_callback(self, HTML_PARSE_TAG_END, self->callback_userdata); + if(res != 0) + return res; + } } } else if(c == '\0') { return 0; -- cgit v1.2.3