always properly escape double quotes
This commit is contained in:
@@ -19,8 +19,8 @@ function(head, req) {
|
|||||||
if (row.value[headers[header]]) {
|
if (row.value[headers[header]]) {
|
||||||
if (startedOutput) send(",");
|
if (startedOutput) send(",");
|
||||||
var value = row.value[headers[header]];
|
var value = row.value[headers[header]];
|
||||||
if (typeof(value) == "object") value = JSON.stringify(value).replace(/\"/g, '""');
|
if (typeof(value) == "object") value = JSON.stringify(value);
|
||||||
send("\"" + value + "\"");
|
send("\"" + value.replace(/\"/g, '""') + "\"");
|
||||||
} else {
|
} else {
|
||||||
if (startedOutput) send(",");
|
if (startedOutput) send(",");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user