sfeed

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

commit 2403a08e72a8d6284caf023713337b597e78bb87
parent 956b5f67049a004ecec4070a7cb1ea2a8f5cd2ef
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu,  8 May 2014 13:09:36 +0000

sfeed_xmlenc: add newline if value is set

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Msfeed_xmlenc.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sfeed_xmlenc.c b/sfeed_xmlenc.c @@ -24,8 +24,11 @@ xmltagend(XMLParser *p, const char *tag, size_t taglen, int isshort) { static void xmlattr(XMLParser *p, const char *tag, size_t taglen, const char *name, size_t namelen, const char *value, size_t valuelen) { if(isxmlpi && (!strncasecmp(name, "encoding", namelen))) { - for(; *value; value++) - putc(tolower((int)*value), stdout); /* output lowercase */ + if(*value) { + for(; *value; value++) + putc(tolower((int)*value), stdout); /* output lowercase */ + putchar('\n'); + } exit(EXIT_SUCCESS); } }