From 3176516b797ce5149991fe28c3d464583a11130b Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 23 May 2024 14:20:44 -0400 Subject: [PATCH] Feeds: Fix error parsing items with rights information - 59afef6 added a duplicate assignment to item.rights that was putting a TextConstruct(!!!!) in the item JSON field instead of a string - info.rights was being set to a TextConstruct (preexisting issue!) --- chrome/content/zotero/xpcom/feedReader.js | 5 +---- test/tests/data/feedArticleMetadata.rss | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/feedReader.js b/chrome/content/zotero/xpcom/feedReader.js index 05b9e2e9d9..513ace7bd4 100644 --- a/chrome/content/zotero/xpcom/feedReader.js +++ b/chrome/content/zotero/xpcom/feedReader.js @@ -82,7 +82,7 @@ Zotero.FeedReader = function (url) { if (publisher) info.publisher = publisher; let rights = feed.rights; - if (rights) info.rights = rights; + if (rights) info.rights = rights.plainText(); let issn = feed.issn; if (issn) info.ISSN = issn; @@ -489,9 +489,6 @@ Zotero.FeedReader._getFeedItem = function (feedEntry, feedInfo) { let publisher = feedEntry.publisher; if (publisher) item.publisher = publisher; - let rights = feedEntry.rights; - if (rights) item.rights = rights; - let language = feedEntry.language; if (language) item.language = language; diff --git a/test/tests/data/feedArticleMetadata.rss b/test/tests/data/feedArticleMetadata.rss index 1222f921c4..5e6108c817 100644 --- a/test/tests/data/feedArticleMetadata.rss +++ b/test/tests/data/feedArticleMetadata.rss @@ -56,5 +56,6 @@ https://www.mdpi.com/2311-5521/9/6/120 + Creative Commons Attribution (CC-BY)