summaryrefslogtreecommitdiff
path: root/sfeed.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2019-02-08 16:24:40 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2019-02-08 16:24:40 +0100
commitb3e9ae52792c1cbedcb701dcfafa1fe430f53e41 (patch)
treef2b6b70523b8c3dc2b4f6c6c77a73edac538d9a1 /sfeed.c
parent0462eada8ea09a0f10706ec750063c6a962fe6a2 (diff)
don't read XML data inside tag for Atom <link href/>
Noticed in the webcomic "amphibian": http://amphibian.com/feeds/atom
Diffstat (limited to 'sfeed.c')
-rw-r--r--sfeed.c6
1 files changed, 5 insertions, 1 deletions
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 },
- /* <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;