Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
fix csv newline characters at export
Browse files Browse the repository at this point in the history
  • Loading branch information
EdisonPeM committed Jun 6, 2021
1 parent b2b0a18 commit 2ea3141
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion services/utils/csvParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ function jsonToCsv(data, headers) {

if (
typeof element === "string" &&
(element.includes(",") || element.includes('"'))
(element.includes("\n") ||
element.includes(",") ||
element.includes('"'))
) {
return `"${escapeQuote(element)}"`;
}
Expand Down

0 comments on commit 2ea3141

Please sign in to comment.