korpling / ANNIS

ANNIS is an open source, versatile web browser-based search and visualization architecture for complex multilevel linguistic corpora with diverse types of annotation.
http://corpus-tools.org/annis/
Apache License 2.0
67 stars 25 forks source link

TextColumnExporter does not escape new lines in meta columns #857

Open thomaskrause opened 3 weeks ago

thomaskrause commented 3 weeks ago

Describe the bug A clear and concise description of what the bug is.

If a corpus contains newlines as meta data value, these are just outputted creating an invalid CSV file.

To Reproduce

Steps to reproduce the behavior:

  1. Download the ReM corpus in the relANNIS data from Laudatio: https://doi.org/10.34644/laudatio-dev-xCS3CnMB7CArCQ9C3LRB
  2. Import it in ANNIS
  3. Execute the TextColumnExporter with any query lemma="ich" and the parameter metakeys=annotation_by on the subcorpus "13_1-bair-P-X"
  4. The output has newlines inside a match.

Expected behavior

The column values should be escaped for new lines and tab characters

Desktop (please complete the following information):