Fixed quoting of line breaks inside a CSV field
This commit is contained in:
parent
a9fefbec5c
commit
1890e710cb
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in New Issue