diff --git a/scripts/xyz_grid.py b/scripts/xyz_grid.py index b9fd66fe54b..606571ff62f 100644 --- a/scripts/xyz_grid.py +++ b/scripts/xyz_grid.py @@ -212,7 +212,10 @@ def list_to_csv_string(data_list): def csv_string_to_list_strip(data_str): - return list(map(str.strip, chain.from_iterable(csv.reader(StringIO(data_str))))) + placeholder = "<<>>" + data_str = data_str.replace(r"\,", placeholder) # Replace escaped commas with the placeholder + values = chain.from_iterable(csv.reader(StringIO(data_str))) + return list(map(lambda s: s.replace(placeholder, ",").strip(), values)) class AxisOption: