Fixed a bug that caused parseStringArray() to return incorrect values for escaped strings

This commit is contained in:
Ahti Heinla 2011-11-30 02:55:22 +02:00
parent b65b76f2bd
commit cdbbf2e61e

View File

@ -66,7 +66,7 @@ var parseStringArray = function(val) {
return x.map(function (el) {
if (el === 'NULL') return null;
if (el[0] === '{') return arguments.callee(el);
if (el[0] === '\"') return el.substring(1, el.length - 1).replace('\\\"', '\"');
if (el[0] === '\"') return el.substring(1, el.length - 1).replace(/\\(.)/g, '$1');
return el;
});
};