Skip to main content

sanitize_csv_value

Function sanitize_csv_value 

Source
pub fn sanitize_csv_value(value: &str) -> String
Expand description

Sanitize a cell value to prevent CSV delimiter injection. Prefixes dangerous leading characters with a single quote to neutralize them. Also handles embedded newlines by quoting the value.