Fixed quoting of line breaks inside a CSV field

This commit is contained in:
Jeremy Stretch 2018-02-02 16:31:23 -05:00
parent a9fefbec5c
commit 1890e710cb

View File

@ -27,7 +27,7 @@ def csv_format(data):
value = '{}'.format(value)
# Double-quote the value if it contains a comma
if ',' in value:
if ',' in value or '\n' in value:
csv.append('"{}"'.format(value))
else:
csv.append('{}'.format(value))