Closed ChristaBull closed 2 months ago
This isn't exactly a bug. The text areas use HTML for the input. This allows for some limited formatting. So if you import html, you output html.
This is from a cell in an excel spreadsheet, column column_allowed_values
:
<p>this is a line.</p><p>This is a new line.</p><p>Here is a question. If we are going to have html in wysiwyg editor, should the csb output be html? Thay will make moving content around easier, but it will make the exported content less human readable.</p><p>add another paragraph in the excel file.<p><p>This one uses a br <br> for a line break</p>.
when it's imported, it looks like this:
This raises another question.
Do you want HTML in text area fields in the data dictionary?
Advantage is that you have some formatting abilities. Disadvantage is that when you import, you either need to go in after and format or your input has to have html. <br>
would work for a line break.
Currently, when you download a data dictionary, text areas include the html. Whether that's good or not depends what you are doing with the spreadsheet. If your are importing into a system that understands html, this is good. Otherwise it makes it less readable for people.
If you want to keep HTML, I think there is a way to strip it from the export, but you would still need at least the <br>
on import of you want line breaks.
@lkmorlan any thoughts on this?
We could write an import filter to covert linebreaks to br
elements.
@lkmorlan - can we do a filter for the import and strip the HTML from the export?
If you don't want HTML, the type of the field should be switched to plain text. Or do you want HTML on the system but not in exports?
Let's go with: if there are breaks in the original import, insert <br>
tags. Leave as HTML for export.
Tested and passed on dv14
OP timer
https://openplus.monday.com/boards/4092908516/pulses/6379005677
Describe the bug
If a CSV contains newline characters it is replaced with a space when the file is imported.
To reproduce
Steps to reproduce the behaviour:
Expected behaviour
Column data quality column value should contain newline characters in CSV file.
Screenshots
What was uploaded![image](https://github.com/bcgov/MFIN-Data-Catalogue/assets/141185297/5cf5bbe6-3aa8-4e75-adf5-591f0c2731e7)
After upload![image](https://github.com/bcgov/MFIN-Data-Catalogue/assets/141185297/6b0264bd-b06f-40c1-bfdd-19f86b41d4b8)