Bug #16966
closedCSV export stop exporting a field when there is a linebreak
0%
Description
Steps to reproduce:
1. Edit a fe_user record.
2. In the "address field", enter:
a
(linebreak)
b
3. Save.
4. From the list view, do a CSV export.
Expected result:
The corresponding field is exported as "a0x0ab".
Actual result:
The corresponding field is cut of at the linebreak: "a".
(issue imported from #M4957)
Files
Updated by Oliver Hader almost 18 years ago
CSV allows line-breaks (see http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm#EmbedBRs)
The attached patch file 0004957.patch removes the crop after the first embedded line-break inside a field. Import/export was also tested with OpenOffice and Excel.
Updated by Oliver Klee almost 18 years ago
The patch solves the problem for me.
I've modified the patch to make it even shorter (and a bit more readable). I'll upload it in a minute.
Updated by Thomas Hempel over 17 years ago
Hi,
patch look sgood so far. Wouldn't it a good idea to add a check if $row is really an array? I'm not sure if this is checked somewhere before or if $row is an array in any case. Anyway if it is not, PHP will throw an ugly error.
Greets,
Thomas
Updated by Oliver Klee over 17 years ago
Let's not mix two separate issues into one bug report (or one patch): If there are problems because $row is not checked to be an array, I propose opening a new bug for this - that would be a different issue than the cut-off text in CSV export.