properly escape double quotes
This commit is contained in:
parent
b941f7ac84
commit
4ba43998e1
@ -19,7 +19,7 @@ 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).replace(/\"/g, '""');
|
||||||
send("\"" + value + "\"");
|
send("\"" + value + "\"");
|
||||||
} else {
|
} else {
|
||||||
if (startedOutput) send(",");
|
if (startedOutput) send(",");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user