diff --git a/modules/ui/markers-overview.js b/modules/ui/markers-overview.js index 10ac506d..8ed5bba5 100644 --- a/modules/ui/markers-overview.js +++ b/modules/ui/markers-overview.js @@ -171,13 +171,15 @@ function overviewMarkers() { function exportMarkers() { const headers = "Id,Type,Icon,Name,Note,X,Y\n"; + const quote = s => '"' + s.replace('"', "'") + '"'; const body = pack.markers.map(marker => { const {i, type, icon, x, y} = marker; const id = `marker${i}`; const note = notes.find(note => note.id === id); - const legend = escape(note.legend); - return [id, type, icon, note.name, legend, x, y].join(","); + const name = note ? quote(note.name) : 'Unknown'; + const legend = note ? quote(note.legend) : ''; + return [id, type, icon, name, legend, x, y].join(","); }); const data = headers + body.join("\n");