commit 81499ca75a8c1cb2440c89241b5f5d06e5c44f5a
parent 5940c794323d58dd94bdabc2e7282e90f15dfeb4
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 22 Jan 2021 22:16:34 +0100
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!
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git 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