escape string while exporting to csv
This commit is contained in:
parent
09e2d37f78
commit
2ac788bf48
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ wn.to_csv = function(data) {
|
|||
var res = [];
|
||||
$.each(data, function(i, row) {
|
||||
row = $.map(row, function(col) {
|
||||
return typeof(col)==="string" ? ('"' + col.replace(/"/g, '\"') + '"') : col;
|
||||
return typeof(col)==="string" ? ('"' + col.replace(/"/g, '""') + '"') : col;
|
||||
});
|
||||
res.push(row.join(","));
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue