From b3e9ae52792c1cbedcb701dcfafa1fe430f53e41 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 8 Feb 2019 16:24:40 +0100 Subject: don't read XML data inside tag for Atom Noticed in the webcomic "amphibian": http://amphibian.com/feeds/atom --- sfeed.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sfeed.c b/sfeed.c index aa8e272..88cb7eb 100644 --- a/sfeed.c +++ b/sfeed.c @@ -132,7 +132,7 @@ static FeedTag atomtags[] = { { STRP("author"), AtomTagAuthor }, { STRP("content"), AtomTagContent }, { STRP("id"), AtomTagId }, - /* */ + /* Atom: , RSS has */ { STRP("link"), AtomTagLink }, { STRP("media:description"), AtomTagMediaDescription }, { STRP("published"), AtomTagPublished }, @@ -740,6 +740,10 @@ xmltagstartparsed(XMLParser *p, const char *tag, size_t taglen, int isshort) return; } + /* don't read field value in Atom tag */ + if (ctx.tagid == AtomTagLink) + ctx.field = NULL; + if (!ISINCONTENT(ctx) || ctx.contenttype != ContentTypeHTML) return; -- cgit v1.2.3