Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double quotes fail in DataTable export #4280

Closed
Ya-Wang opened this issue Oct 26, 2017 · 2 comments
Closed

Double quotes fail in DataTable export #4280

Ya-Wang opened this issue Oct 26, 2017 · 2 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Ya-Wang
Copy link

Ya-Wang commented Oct 26, 2017

CSV export doesn't escape double quotes

Simple fix. Please include in next update.

datatable.js

  data.forEach(function (record, i) {
            csv += '\n';
            for (var i_1 = 0; i_1 < _this.columns.length; i_1++) {
                if (_this.columns[i_1].field) {
                    csv += '"' + (''+_this.resolveFieldData(record, _this.columns[i_1].field)).replace('"', '""') + '"';
                    if (i_1 < (_this.columns.length - 1)) {
                        csv += _this.csvSeparator;
                    }
                }
            }
        });
@nat2k5us
Copy link

I need this functionality as well - can you please let me know when this this will be in?

@cagataycivici cagataycivici self-assigned this Nov 6, 2017
@cagataycivici cagataycivici added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working Status: Pending Review Issue or pull request is being reviewed by Core Team labels Nov 6, 2017
@cagataycivici cagataycivici added this to the 4.3.1 milestone Nov 6, 2017
@cagataycivici cagataycivici changed the title Double quotes In ExportCSV Datatable Double quotes fail in DataTable export Nov 6, 2017
@cagataycivici cagataycivici added confirmed and removed Status: Pending Review Issue or pull request is being reviewed by Core Team labels Nov 6, 2017
@waratah
Copy link
Contributor

waratah commented Jun 14, 2022

see #4615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants