summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-03-09 19:23:07 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-03-11 10:11:06 +0100
commitf869ea9ce274aaefb04963e51462700d9fd74232 (patch)
tree62d76a52e7633b34661ac2e99a2afff3e5dfdb64
parent52cd6f7ad6a87b8419cfa8a0ffb6f8546b985e2f (diff)
sfeed_html/sfeed_frames: fix bold markup for lynx
The previous style was not bold: <b><a href="">some link</a></b> The following link is now bold: <a href=""><b>some link</b></a>
-rw-r--r--sfeed_frames.c11
-rw-r--r--sfeed_html.c12
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&nbsp;%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&nbsp;%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);