소스 검색

Fixed quoting of line breaks inside a CSV field

Jeremy Stretch 8 년 전
부모
커밋
1890e710cb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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))