Browse Source

Fixed quoting of line breaks inside a CSV field

Jeremy Stretch 7 years ago
parent
commit
1890e710cb
1 changed files with 1 additions and 1 deletions
  1. 1 1
      netbox/utilities/utils.py

+ 1 - 1
netbox/utilities/utils.py

@@ -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))