From 81499ca75a8c1cb2440c89241b5f5d06e5c44f5a Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Fri, 22 Jan 2021 22:16:34 +0100 Subject: sfeed: fix regression with parsing content fields This regression introduced in commit e43b7a48 on Tue Oct 6 18:51:33 2020 +0200. After a content tag was parsed the "iscontenttag" variable was not reset. This caused 2 regressions: - It ignored other tags such as links after it. - It incorrectly set the content-type of a lesser priority field. Thanks to pazz0 for reporting it! --- sfeed.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sfeed.c b/sfeed.c index b765852..bd3afbc 100644 --- a/sfeed.c +++ b/sfeed.c @@ -883,18 +883,17 @@ xmltagstart(XMLParser *p, const char *t, size_t tl) case RSSTagContentEncoded: case RSSTagDescription: tmpcontenttype = ContentTypeHTML; /* default content-type */ - ctx.iscontenttag = 1; break; case RSSTagMediaDescription: case AtomTagContent: case AtomTagMediaDescription: case AtomTagSummary: tmpcontenttype = ContentTypePlain; /* default content-type */ - ctx.iscontenttag = 1; break; default: break; } + ctx.iscontenttag = (fieldmap[ctx.tag.id] == FeedFieldContent); } static void -- cgit v1.2.3