Skip to content

Commit

Permalink
properly escape quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed May 11, 2020
1 parent ef25067 commit 263d00f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,9 @@ class Sidebar extends PureComponent<Props, State> {
if (t.detailedTxns) {
return t.detailedTxns.map(dt => {
const normaldate = dateformat(t.time * 1000, 'mmm dd yyyy hh::MM tt');
return `${t.time},"${normaldate}","${t.txid}","${t.type}",${dt.amount},"${dt.address}","${dt.memo ||
''}"`;
const escapedMemo = dt.memo ? dt.memo.replace(/"/g, '""') : '';

return `${t.time},"${normaldate}","${t.txid}","${t.type}",${dt.amount},"${dt.address}","${escapedMemo}"`;
});
} else {
return [];
Expand Down

0 comments on commit 263d00f

Please sign in to comment.