From 356e7d79925f91b9b703ee63e3680694c53a59a4 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 31 Jul 2015 21:06:52 +0200 Subject: Various improvements - Only escape characters in "content" field, these can contain newlines. - Trim newlines and tabs, etc from the title, id and author fields. - Make decodefield, xmlencode functions easier to "chain" without allocatting new buffers. - Move printutf8pad from util (only used by sfeed_plain) to sfeed_plain. - Update README, still need to update the man-page and improve the documentation in general. - Code cleanup. --- sfeed_html.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'sfeed_html.c') diff --git a/sfeed_html.c b/sfeed_html.c index efd39db..545537e 100644 --- a/sfeed_html.c +++ b/sfeed_html.c @@ -24,11 +24,11 @@ printfeed(FILE *fp, struct feed *f) if (f->name[0] != '\0') { fputs("

name, stdout); + print(f->name, stdout, xmlencode); fputs("\">name, stdout); + print(f->name, stdout, xmlencode); fputs("\">", stdout); - printxmlencoded(f->name, stdout); + print(f->name, stdout, xmlencode); fputs("

\n", stdout); } fputs("\n", stdout); @@ -53,10 +53,10 @@ printfeed(FILE *fp, struct feed *f) fputs("", stdout); if (islink) { fputs("", stdout); } - printxmlencoded(fields[FieldTitle], stdout); + print(fields[FieldTitle], stdout, xmlencode); if (islink) fputs("", stdout); if (isnew) @@ -126,11 +126,11 @@ main(int argc, char *argv[]) fputs("
  • name, stdout); + print(f->name, stdout, xmlencode); fputs("\">", stdout); if (f->totalnew > 0) fputs("", stdout); - printxmlencoded(f->name, stdout); + print(f->name, stdout, xmlencode); fprintf(stdout, " (%lu)", f->totalnew); if (f->totalnew > 0) fputs("", stdout); -- cgit v1.2.3