diff --git a/handlers.c b/handlers.c index 6371480..5eb3eac 100644 --- a/handlers.c +++ b/handlers.c @@ -132,9 +132,14 @@ openFile(const char *folder, char *fileName, char *fileExt) static void outputHtml(itemStruct *item, FILE *f) { - fprintf(f, "

%s


\n", item->fields[FIELD_TITLE]); - fprintf(f, "Link
\n", item->fields[FIELD_LINK]); - fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]); + if (item->fields[FIELD_TITLE]) + fprintf(f, "

%s


\n", item->fields[FIELD_TITLE]); + if (item->fields[FIELD_LINK]) + fprintf(f, "Link
\n", item->fields[FIELD_LINK]); + if (item->fields[FIELD_ENCLOSURE_URL]) + fprintf(f, "Enclosure
\n", item->fields[FIELD_ENCLOSURE_URL]); + if (item->fields[FIELD_DESCRIPTION]) + fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]); } void