sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 3718d500175f634e5a718464b64b0c224fa62284
parent 6fb7a2d6189335be489424d9aebc73cd53d151ec
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 24 Oct 2021 21:00:58 +0200

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.

Diffstat:
Msfeed_mbox.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git 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);