if( !strcmp(lines[i], RSSYL_TEXT_START) ) {
debug_print("RSSyl: Leading html tag found at line %d\n", i);
past_html_tag = TRUE;
+ body = g_string_new("");
i++;
continue;
}
continue;
}
- if (body) {
+ if (body->len > 0)
body = g_string_append_c(body, '\n');
- body = g_string_append(body, lines[i]);
- } else {
- body = g_string_new(lines[i]);
- }
+ body = g_string_append(body, lines[i]);
i++;
}
}
if (body != NULL ) {
- if (past_endhtml_tag && body->str != NULL && body->len > 0)
+ if (past_html_tag && past_endhtml_tag && body->str != NULL)
feed_item_set_text(item, body->str);
g_string_free(body, TRUE);
}
(heading ? heading : ""),
(tmpurl ? tmpurl : ""),
(tmpurl ? tmpurl : "n/a"),
- (text ? text : ""), (text ? "\n" : "") );
+ (text ? text : ""),
+ (text && strlen(text) > 0 ? "\n" : "") );
g_free(meta_charset);
g_free(baseurl);