I have an aura component that exports a list of cases to a CSV. In the description field, customers have been inserting double quotes in the field (example "variable") which breaks the columns of the CSV export.
When I try to add a replace in the component controller like this
row['Description'] = row['Description'].replace(/",/g,'""');
or like this
row['Description'] = row['Description'].replace(/"/g, '\"');
The framework throws this error 'Unterminated string [311, 103]: '');'
Can I escape a doublequote so my CSV exports properly?