diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2019-02-08 16:24:40 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2019-02-08 16:24:40 +0100 |
commit | b3e9ae52792c1cbedcb701dcfafa1fe430f53e41 (patch) | |
tree | f2b6b70523b8c3dc2b4f6c6c77a73edac538d9a1 | |
parent | 0462eada8ea09a0f10706ec750063c6a962fe6a2 (diff) |
don't read XML data inside tag for Atom <link href/>
Noticed in the webcomic "amphibian":
http://amphibian.com/feeds/atom
-rw-r--r-- | sfeed.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |