Fix Translate tests on Windows

This commit is contained in:
Aurimas Vinckevicius 2015-09-17 12:58:19 -05:00
parent 8900a83b7d
commit 38b9bbc8c8

View file

@ -47,7 +47,7 @@ function saveItemsThroughTranslator(translatorType, items) {
translate.setTranslator(buildDummyTranslator(translatorType == "web" ? 4 : 1,
"function detectWeb() {}\n"+
"function do"+tyname+"() {\n"+
" var json = JSON.parse('"+JSON.stringify(items).replace(/'/g, "\'")+"');\n"+
" var json = JSON.parse('"+JSON.stringify(items).replace(/['\\]/g, "\\$&")+"');\n"+
" for (var i=0; i<json.length; i++) {"+
" var item = new Zotero.Item;\n"+
" for (var field in json[i]) { item[field] = json[i][field]; }\n"+