commit b3e9ae52792c1cbedcb701dcfafa1fe430f53e41
parent 0462eada8ea09a0f10706ec750063c6a962fe6a2
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 8 Feb 2019 16:24:40 +0100
don't read XML data inside tag for Atom <link href/>
Noticed in the webcomic "amphibian":
http://amphibian.com/feeds/atom
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sfeed.c b/sfeed.c
@@ -132,7 +132,7 @@ static FeedTag atomtags[] = {
{ STRP("author"), AtomTagAuthor },
{ STRP("content"), AtomTagContent },
{ STRP("id"), AtomTagId },
- /* <link href="" /> */
+ /* Atom: <link href="" />, RSS has <link></link> */
{ 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 <link> tag */
+ if (ctx.tagid == AtomTagLink)
+ ctx.field = NULL;
+
if (!ISINCONTENT(ctx) || ctx.contenttype != ContentTypeHTML)
return;