aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-15 15:16:29 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-15 15:16:29 +0200
commita87880a43c06e9475b59e6c7741c695b4e41b20c (patch)
treec5e820a3971d128b8ed8c3dfbc680a1847e2c71a
parent9cafc14e2508224c901f5a03bb6fda73f0c51e57 (diff)
Strip newlines at the beginning and end of text
-rw-r--r--src/HtmlSearch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HtmlSearch.c b/src/HtmlSearch.c
index d72055a..ebf2e4a 100644
--- a/src/HtmlSearch.c
+++ b/src/HtmlSearch.c
@@ -448,8 +448,8 @@ static int merge_inner_text(QuickMediaHtmlNode *node, QuickMediaString *str) {
const char *inner_text = node->name.data;
size_t inner_text_size = node->name.size;
strip(inner_text, inner_text_size, &inner_text, &inner_text_size, is_newline);
- if(inner_text_size > 0) { /* ignore empty text, but add the original text */
- if(string_append(str, node->name.data, node->name.size) != 0)
+ if(inner_text_size > 0) {
+ if(string_append(str, inner_text, inner_text_size) != 0)
return 1;
}
}