Added more csv character escaping
This commit is contained in:
parent
06d2d8ffdb
commit
71a1144680
@ -95,7 +95,7 @@ data class Observation(
|
||||
fun escapeSpecialCharacters(data: String): String {
|
||||
return data.replace("\"", "\"\"").replace("\n", ";")
|
||||
}
|
||||
val dataPortion = "${date.toString("dd/MM/yyyy")},\"$person, ${type.name} ${scenarios.joinToString { it.title }}\"," +
|
||||
val dataPortion = "${date.toString("dd/MM/yyyy")},\"${escapeSpecialCharacters(person)}, ${type.name} ${scenarios.joinToString { escapeSpecialCharacters(it.title) }}\"," +
|
||||
"\"Training\",\"Operations - Shift Operations\",\"${site.name}\",\"N/A\"," +
|
||||
"${roundScore(monitoring)},${roundScore(controlProcedural)},${roundScore(control)}," +
|
||||
"${roundScore(conservatism)},${roundScore(teamworkCommunications)},${roundScore(teamworkLeadership)}," +
|
||||
|
Loading…
Reference in New Issue
Block a user