commit 29be9299ef304ef77d96bfb661dbed3828b4aa26
parent cdf2acbc7bac34098114561a45ab9eee049b05ba
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 1 Aug 2015 00:33:47 +0200
sfeed_mbox: xmlencode link for HTML mail, simplify a bit
Diffstat:
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
@@ -61,15 +61,13 @@ printfeed(FILE *fp, const char *feedname)
if (!strcmp(fields[FieldContentType], "html")) {
fputs("<p>Link: <a href=\"", stdout);
- print(fields[FieldLink], stdout, fputc);
+ print(fields[FieldLink], stdout, xmlencode);
fputs("\">", stdout);
- print(fields[FieldLink], stdout, fputc);
+ fputs(fields[FieldLink], stdout);
fputs("</a></p>\n\n", stdout);
decodefield(fields[FieldContent], stdout, fputc);
} else {
- fputs("Link: ", stdout);
- print(fields[FieldLink], stdout, fputc);
- fputs("\n\n", stdout);
+ printf("Link: %s\n\n", fields[FieldLink]);
decodefield(fields[FieldContent], stdout, fputc);
}
fputs("\n\n", stdout);