From d4226920d8ef1738bbd962da1a29d7c80a7de5cf Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Tue, 29 Sep 2020 11:48:47 +0100 Subject: [PATCH] Changed CSV newline escape replacement character --- .../src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt index 0c91f6f..fd39941 100644 --- a/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt +++ b/backend/src/main/kotlin/uk/co/neviyn/observationdatabase/Entity.kt @@ -93,7 +93,7 @@ data class Observation( ) { fun toCsvFormat(): String { fun escapeSpecialCharacters(data: String): String { - return data.replace("\"", "\"\"").replace("\n", "") + return data.replace("\"", "\"\"").replace("\n", ";") } val dataPortion = "${date.toString("dd/MM/yyyy")},\"$person, ${type.name} ${scenarios.joinToString { it.title }}\"," + "\"Training\",\"Operations - Shift Operations\",\"${site.name}\",\"N/A\"," +