commit aed441e152132a5d42dc9fad89bdb16f5480267b
parent 7f12d2c095634fd54689d74081211a7da6f37225
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 28 Sep 2010 21:39:47 +0000
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
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git 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]) {