### Steps to reproduce
1. Enable "Export to PDF or CSV enabled" and setup it's Roles as expected.
2. Login with the user with an authorized Role to export as PDF/CSV.
3. Go to "Export" pages and export all as CSV.
### Expected behaviour
When the "Description" field contains Enter (`` tag``), Teampass should remove the "Enter" so it would export as expected.
### Actual behaviour
The item was exported with the following line at the CSV:
```
162,"VPN - XXX - Fortgate (Terceirizada)","VPN: SSL-VPN
```
It's simply broken and every other information after it (like username and password) is missing from the exported CSV file.
I could filter wrong exported entries (into my case) by finding lines that do not end with one comma at the end with the following RegEx:
```
.*(?
It seems that only items migrated from Teampass 2.x -> Teampass 3.x is affected. When I edited the Description field to redo the "Enters", it saved as Paragraphs (paragraphs between <p></p> tags) and they were exported as expected. I believe that for Enters the Teampass 2.x used <br /> tags instead. Not sure, but I believe this issue while parsing <br /> and List tags maybe related to the cleanString function from the main.functions.php file (as can be seen https://github.com/nilsteampassnet/TeamPass/blob/e9f7e3772b65a7dd943782418236a2ca154eecad/sources/main.functions.php).
It seems to strip <br> tags (Shift + Enter) when exporting, only <br /> tag (items "Description" migrated from Tempass 2.x) seems to fail.
Before updating the Description field:
210,"Switch 3Com 1910","Necessá|rio alterar o campo Bits por segundo da porta COM para 38400 no Gerenciador de dispositivos para acesso Console.
After upgrading the Description field:
210,"Switch 3Com 1910","Necess?rio alterar o campo Bits por segundo da porta COM para 38400 no Gerenciador de dispositivos para acesso Console.Para habilitar a execu??o de todos os comandos, execute no terminal:_cmdline-mode onPlease input password: |512900",(semsenha),admin,,False,,,,
It also seems to fail to parse the CSV output when the item Description field contains a list created by the HTML editor available from the field, e.g.:
tag``), Teampass should remove the "Enter" so it would export as expected. ### Actual behaviour The item was exported with the following line at the CSV: ``` 162,"VPN - XXX - Fortgate (Terceirizada)","VPN: SSL-VPN ``` It's simply broken and every other information after it (like username and password) is missing from the exported CSV file. I could filter wrong exported entries (into my case) by finding lines that do not end with one comma at the end with the following RegEx: ``` .*(?
It seems that only items migrated from Teampass 2.x -> Teampass 3.x is affected. When I edited the
Description
field to redo the "Enters", it saved as Paragraphs (paragraphs between<p></p>
tags) and they were exported as expected. I believe that for Enters the Teampass 2.x used<br />
tags instead. Not sure, but I believe this issue while parsing<br />
and List tags maybe related to thecleanString
function from themain.functions.php
file (as can be seen https://github.com/nilsteampassnet/TeamPass/blob/e9f7e3772b65a7dd943782418236a2ca154eecad/sources/main.functions.php).It seems to strip
<br>
tags (Shift + Enter) when exporting, only<br />
tag (items "Description" migrated from Tempass 2.x) seems to fail.Before updating the
Description
field:After upgrading the
Description
field:It also seems to fail to parse the CSV output when the item
Description
field contains a list created by the HTML editor available from the field, e.g.:CSV output:
225,"3CX PABX","Endere?os externos:
<br>
strings is also broken while exporting, e.g.:Description
field:CSV output:
It only exports as expected when it's between
<p>
tags, e.g.:Description
field:CSV output:
A fix has been committed. Please reopen if needed.