From aed441e152132a5d42dc9fad89bdb16f5480267b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 28 Sep 2010 21:39:47 +0000 Subject: [PATCH] Fixes #1727, PATCH: Trim whitespace from RIS TY field to correctly identify types And pushed to clients. Changed String.trim() to Zotero.Utilities.trim(), since String.trim() isn't supported in Fx3.0 --- translators/RIS.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/translators/RIS.js b/translators/RIS.js index b75057931e..65d3a4fedf 100644 --- a/translators/RIS.js +++ b/translators/RIS.js @@ -8,7 +8,7 @@ "maxVersion":"", "priority":100, "inRepository":true, - "lastUpdated":"2010-09-13 08:15:39" + "lastUpdated":"2010-09-28 21:40:00" } Zotero.configure("dataMode", "line"); @@ -109,7 +109,10 @@ function processTag(item, tag, value) { item[inputFieldMap[tag]] = value; } else if(tag == "TY") { // look for type - + + // trim the whitespace that some providers (e.g. ProQuest) include + value = Zotero.Utilities.trim(value); + // first check typeMap for(var i in typeMap) { if(value == typeMap[i]) {