escape_csv_cell

Function escape_csv_cell 

Source
pub fn escape_csv_cell(value: &str, opts: &CsvCellOptions<'_>) -> String
Expand description

Escape one CSV cell: neutralise spreadsheet formula injection (CWE-1236), then apply RFC 4180 quoting.

The guard is non-destructive — it looks past leading invisibles rather than stripping them — and runs BEFORE quoting, so a value that both starts with a trigger and contains the delimiter still gets wrapped.