summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-10-24 21:00:58 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-10-25 23:02:33 +0200
commit3718d500175f634e5a718464b64b0c224fa62284 (patch)
tree8efd8af309fa432d5b517c4ba7ab9cafc077c55f
parent6fb7a2d6189335be489424d9aebc73cd53d151ec (diff)
sfeed_mbox: add link as base URL for HTML content
This is useful for HTML viewers (like lynx -dump) in mail clients to use the base href as the base URL for relative links in the HTML content.
-rw-r--r--sfeed_mbox.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index e6c756f..34b9b4a 100644
--- a/sfeed_mbox.c
+++ b/sfeed_mbox.c
@@ -123,6 +123,11 @@ printfeed(FILE *fp, const char *feedname)
}
if (usecontent) {
fputs("\n", stdout);
+ if (ishtml && fields[FieldLink][0]) {
+ fputs("<base href=\"", stdout);
+ xmlencode(fields[FieldLink], stdout);
+ fputs("\"/>\n", stdout);
+ }
printcontent(fields[FieldContent], stdout);
}
fputs("\n\n", stdout);