Trim all strings before adding to the DB

This commit is contained in:
Simon Kornblith 2011-07-03 19:38:14 +00:00
parent b876e8bf27
commit e671496260

View file

@ -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);