commit e67149626058cfc12893aa68ca064ff416208d81
parent b876e8bf27b5dee87a5955580741d6be501eaa90
Author: Simon Kornblith <simon@simonster.com>
Date: Sun, 3 Jul 2011 19:38:14 +0000
Trim all strings before adding to the DB
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git 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);