From 737922a5a4b0b613571d30077fb2ac434a2e0b2f Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sat, 27 Apr 2019 14:58:36 +0800 Subject: [PATCH] fix #904 --- packages/react-bootstrap-table2-toolkit/src/csv/exporter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-bootstrap-table2-toolkit/src/csv/exporter.js b/packages/react-bootstrap-table2-toolkit/src/csv/exporter.js index cb967b5..4d4c5cd 100644 --- a/packages/react-bootstrap-table2-toolkit/src/csv/exporter.js +++ b/packages/react-bootstrap-table2-toolkit/src/csv/exporter.js @@ -42,7 +42,7 @@ export const transform = ( cellContent = m.formatter(cellContent, row, rowIndex, m.formatExtraData); } if (m.type === String) { - return `"${cellContent}"`; + return `"${`${cellContent}`.replace(/"/g, '""')}"`; } return cellContent; }).join(separator)).join('\n');