From b924720a2d3e605cf4579b3d2ec697a96a2a9dfb Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 5 Feb 2023 21:31:49 -0500 Subject: [PATCH] Detect retractions for DOIs with capital letters https://forums.zotero.org/discussion/102745/retraction-watch-not-working --- chrome/content/zotero/xpcom/retractions.js | 2 ++ test/tests/retractionsTest.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/retractions.js b/chrome/content/zotero/xpcom/retractions.js index 0f714c5219..fc5fcada87 100644 --- a/chrome/content/zotero/xpcom/retractions.js +++ b/chrome/content/zotero/xpcom/retractions.js @@ -716,6 +716,8 @@ Zotero.Retractions = { _valueToKey: function (type, value) { if (type == this.TYPE_DOI) { + // DOIs are case-insensitive + value = value.toLowerCase(); return Zotero.Utilities.Internal.sha1(value); } return value; diff --git a/test/tests/retractionsTest.js b/test/tests/retractionsTest.js index c1948db782..f12c9a76c8 100644 --- a/test/tests/retractionsTest.js +++ b/test/tests/retractionsTest.js @@ -4,7 +4,7 @@ describe("Retractions", function() { var zp; var server; var checkQueueItemsStub; - var retractedDOI = '10.1016/S0140-6736(97)11096-0'; + var retractedDOI = '10.1039/C3AN01547E'; before(async function () { userLibraryID = Zotero.Libraries.userLibraryID;