From e67149626058cfc12893aa68ca064ff416208d81 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Sun, 3 Jul 2011 19:38:14 +0000 Subject: [PATCH] Trim all strings before adding to the DB --- chrome/content/zotero/xpcom/translation/translate.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js index 44808a52fa..de3cd856dd 100644 --- a/chrome/content/zotero/xpcom/translation/translate.js +++ b/chrome/content/zotero/xpcom/translation/translate.js @@ -94,6 +94,7 @@ Zotero.Translate.Sandbox = { // remove null, undefined, and false properties for(var i in item) { if(!item[i] && item[i] !== 0) delete item[i]; + if(typeof item[i] === "string") item[i] = item[i].trim(); } translate.newItems.push(item);