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

Improve escaping of values in CSV exports #21719

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Improve escaping of values in CSV exports #21719

merged 2 commits into from
Dec 20, 2023

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Dec 19, 2023

Description:

Our CSV files are using a normal comma as separator. Currently values will be only surrounded by double quotes if they contain such a comma or a double quote. This works perfectly fine when opening such a file and choosing the correct separator.
Some tools allow to use multiple separators. Typically those separator are either comma, semicolon or tab.
Using all of them at once, would currently only break if a string contains a semicolon, as tabs are removed from values anyway and commas are correctly escaped.

For a better compatibility this PR adds the automatic escaping for all typical separators.

refs AS-288

Review

@sgiehl sgiehl added the Needs Review PRs that need a code review label Dec 19, 2023
@sgiehl sgiehl added this to the 5.0.1 milestone Dec 19, 2023
@sgiehl sgiehl merged commit 9ae487c into 5.x-dev Dec 20, 2023
18 of 25 checks passed
@sgiehl sgiehl deleted the csvescaping branch December 20, 2023 10:31
sgiehl added a commit that referenced this pull request Oct 10, 2024
* Improve escaping of values in CSV exports

* adjust tests
sgiehl added a commit that referenced this pull request Oct 14, 2024
…2658)

* Adds some tests around correct handling of formulas in CSV export (#22646)

* Improve escaping of values in CSV exports (#21719)

* Improve escaping of values in CSV exports

* adjust tests

* updates expected test files

* fix marketplace test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants