diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-01-22 22:16:34 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2021-01-22 22:16:34 +0100 |
commit | 81499ca75a8c1cb2440c89241b5f5d06e5c44f5a (patch) | |
tree | 53ecce65420ac7c17a9787df1ae073d7fbc73b65 | |
parent | 5940c794323d58dd94bdabc2e7282e90f15dfeb4 (diff) |
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!
-rw-r--r-- | sfeed.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -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 |