Skip to content

Exporting answers containing newline \n\n characters causes the CSV to break apart #65

@argonimos

Description

@argonimos

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create questions with the "longtext" answer type
  2. Get answers containing newline characters such as "\n\n"
  3. Export answers using the "Export to csv" feature
  4. Open resulting csv file in excel and try to view the columns

Expected behaviour

All answers are seperated into one single row per answer and one column per question. Newline characters are escaped so that excel or other software recognizes it as a newline inside of a cell and not a linebreak for the whole csv.

Actual behaviour

Answers containing newline characters are split into multiple rows, breaking apart the whole resulting table. See csv file as an example:

umfrage-einzelhandel-zum-einkaufserlebnis-responses (1).csv

and compare with the json export:

umfrage-einzelhandel-zum-einkaufserlebnis-responses.json

Server configuration

Web server: Apache

Database: Tested on MySQL

**PHP version:**Tested on 8.3.30

Nextcloud version: Tested on 33.0.0

Nextcloud configuration Enabled: - formvox: 1.1.0

Browser

Browser name: Microsoft Edge

Browser version: 145.0.3800.82

Operating system: Windows 11

Browser log

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending approval or rejectionbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions