netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Multiple "All Data (CSV)" Exports contain extra lines

Open gdprdatasubect opened this issue 1 year ago • 2 comments

NetBox version

v3.6.6

Python version

3.8

Steps to Reproduce

  1. Create at least two devices, one containing a rear port, one containing an interface
  2. Connect the rear port to an interface
  3. Navigate to dcim/rear-ports/ ; use filters if you want to
  4. Export via "Export" -> "All Data (CSV)"
  5. Notice that the file contains extra lines where the ">" was probably not handled correctly: image (Optional: 6. Be annoyed enough by the bug to write a report)

Expected Behavior

No extra lines

Observed Behavior

Lines added

gdprdatasubect avatar Dec 01 '23 23:12 gdprdatasubect

It just came to my mind to try the other way around too… dcim/interfaces "All Data (CSV)"-exports are broken worse: image

gdprdatasubect avatar Dec 01 '23 23:12 gdprdatasubect

To be clear, the exported CSV here is valid; the issue is the errant line breaks present in the link_peers column values. We probably need to add a value() method to the table column to handle plaintext export in addition to the HTML rendering employed by the UI (which includes a right-angle bracket icon).

jeremystretch avatar Dec 05 '23 14:12 jeremystretch