mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
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
Block a user