Skip to content

Commit 654b695

Browse files
committed
[frontend] escaping new line charater in CSV export
1 parent 3ca5039 commit 654b695

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

openaev-front/src/utils/Environment.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export const APP_BASE_PATH = isEmptyPath || contextPath.startsWith('/') ? contex
4343
export const fileUri = fileImport => `${APP_BASE_PATH}${fileImport}`; // No slash here, will be replaced by the builder
4444

4545
// Export
46-
const escape = value => value?.toString().replaceAll('"', '""');
46+
const escape = value => value?.toString()
47+
.replaceAll('"', '""')
48+
.replaceAll('\n', '\\n');
4749
export const exportData = (
4850
type,
4951
keys,

0 commit comments

Comments
 (0)