diff options
-rw-r--r-- | sfeed_frames.c | 11 | ||||
-rw-r--r-- | sfeed_html.c | 12 |
2 files changed, 11 insertions, 12 deletions
diff --git a/sfeed_frames.c b/sfeed_frames.c index f367bec..84116b0 100644 --- a/sfeed_frames.c +++ b/sfeed_frames.c @@ -55,19 +55,18 @@ printfeed(FILE *fpitems, FILE *fpin, struct feed *f) fprintf(fpitems, "%04d-%02d-%02d %02d:%02d ", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); - if (isnew) - fputs("<b><u>", fpitems); if (fields[FieldLink][0]) { fputs("<a href=\"", fpitems); xmlencode(fields[FieldLink], fpitems); fputs("\">", fpitems); - xmlencode(fields[FieldTitle], fpitems); - fputs("</a>", fpitems); - } else { - xmlencode(fields[FieldTitle], fpitems); } if (isnew) + fputs("<b><u>", fpitems); + xmlencode(fields[FieldTitle], fpitems); + if (isnew) fputs("</u></b>", fpitems); + if (fields[FieldLink][0]) + fputs("</a>", fpitems); fputs("\n", fpitems); } fputs("</pre>\n", fpitems); diff --git a/sfeed_html.c b/sfeed_html.c index 3afd18f..ac75db0 100644 --- a/sfeed_html.c +++ b/sfeed_html.c @@ -55,19 +55,19 @@ printfeed(FILE *fp, struct feed *f) fprintf(stdout, "%04d-%02d-%02d %02d:%02d ", tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); - if (isnew) - fputs("<b><u>", stdout); + if (fields[FieldLink][0]) { fputs("<a href=\"", stdout); xmlencode(fields[FieldLink], stdout); fputs("\">", stdout); - xmlencode(fields[FieldTitle], stdout); - fputs("</a>", stdout); - } else { - xmlencode(fields[FieldTitle], stdout); } if (isnew) + fputs("<b><u>", stdout); + xmlencode(fields[FieldTitle], stdout); + if (isnew) fputs("</u></b>", stdout); + if (fields[FieldLink][0]) + fputs("</a>", stdout); fputs("\n", stdout); } fputs("</pre>\n", stdout); |