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

CSV export does not escape double quotes #4910

Closed
domme0711 opened this issue Sep 8, 2022 · 1 comment · Fixed by #4911
Closed

CSV export does not escape double quotes #4910

domme0711 opened this issue Sep 8, 2022 · 1 comment · Fixed by #4911
Labels
area/export Affects print/export functionality bug Something isn't working

Comments

@domme0711
Copy link
Contributor

domme0711 commented Sep 8, 2022

Describe the bug

When exporting the eventhistory as CSV: double quotes which are contained in comments are not escaped. This results in a broken CSV file which cannot be parsed properly.

To Reproduce

  1. Add any comment which contains double quotes to a host or service.
  2. Go to History => Event Overview
  3. Export the view as CSV (/icingaweb2/monitoring/list/eventhistory?timestamp%3E=-7%20days&format=csv)

Expected behavior

Download of a properly formatted CSV file. Strings are encapsulated by double quotes. Double quotes within these strings has to be escaped.

Screenshots

grafik

Your Environment

  • Icinga Web 2 version and modules (System - About): 2.11.1
  • Web browser used: FF
  • Icinga 2 version used (icinga2 --version): 2.13.5
  • PHP version used (php --version): 7.4.6
  • Server operating system and version: SLES15
domme0711 added a commit to domme0711/icingaweb2 that referenced this issue Sep 8, 2022
@nilmerg nilmerg added bug Something isn't working area/export Affects print/export functionality labels Sep 12, 2022
@nilmerg
Copy link
Member

nilmerg commented Sep 12, 2022

Hi,

you are right, thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/export Affects print/export functionality bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants