summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-08-01 00:33:47 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-08-01 00:33:47 +0200
commit29be9299ef304ef77d96bfb661dbed3828b4aa26 (patch)
tree94e2e3a479e83eb6addbf4db9cbbbe99bfbb0b97
parentcdf2acbc7bac34098114561a45ab9eee049b05ba (diff)
sfeed_mbox: xmlencode link for HTML mail, simplify a bit
-rw-r--r--sfeed_mbox.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sfeed_mbox.c b/sfeed_mbox.c
index fdcd17d..5c531e3 100644
--- 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);