From 7ab5fc54b9671ee435a6258892b667196c4ad598 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 24 Nov 2019 15:11:48 +0100 Subject: sfeed_opml_import: improve import with nested This nested format is used by Mozilla Thunderbird: other tests: - newsboat -e uses the title attribute, not text. - rss2email 3.x, r2e opmlexport uses type, text and xmlUrl (correct). --- sfeed_opml_import.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sfeed_opml_import.c b/sfeed_opml_import.c index 03c7da3..df74cc9 100644 --- a/sfeed_opml_import.c +++ b/sfeed_opml_import.c @@ -29,6 +29,12 @@ printsafe(const char *s) } } +static void +xmltagstart(XMLParser *p, const char *t, size_t tl) +{ + url[0] = text[0] = title[0] = '\0'; +} + static void xmltagend(XMLParser *p, const char *t, size_t tl, int isshort) { @@ -47,6 +53,7 @@ xmltagend(XMLParser *p, const char *t, size_t tl, int isshort) printsafe(url); fputs("'\n", stdout); } + url[0] = text[0] = title[0] = '\0'; } @@ -88,6 +95,7 @@ main(void) parser.xmlattr = xmlattr; parser.xmlattrentity = xmlattrentity; + parser.xmltagstart = xmltagstart; parser.xmltagend = xmltagend; fputs( -- cgit v1.2.3