From f317303d77b519bb5d7e13db6247c1cf3ae0a5ae Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 2 Jan 2023 03:38:53 +0100 Subject: Exclude only whitespace text tags --- src/HtmlSearch.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c index cdd4759..f1631a7 100644 --- a/src/HtmlSearch.c +++ b/src/HtmlSearch.c @@ -402,6 +402,9 @@ static int html_parse_callback(HtmlParser *html_parser, HtmlParseType parse_type case HTML_PARSE_TEXT: /* fallthrough */ case HTML_PARSE_JAVASCRIPT_CODE: { + if(html_parser->text_stripped.size == 0) + return 0; + QuickMediaHtmlChildNode *child_node = malloc(sizeof(QuickMediaHtmlChildNode)); if(!child_node) return 1; -- cgit v1.2.3