netbox
netbox copied to clipboard
Multiple "All Data (CSV)" Exports contain extra lines
NetBox version
v3.6.6
Python version
3.8
Steps to Reproduce
- Create at least two devices, one containing a rear port, one containing an interface
- Connect the rear port to an interface
- Navigate to dcim/rear-ports/ ; use filters if you want to
- Export via "Export" -> "All Data (CSV)"
- Notice that the file contains extra lines where the ">" was probably not handled correctly:
(Optional: 6. Be annoyed enough by the bug to write a report)
Expected Behavior
No extra lines
Observed Behavior
Lines added
It just came to my mind to try the other way around too…
dcim/interfaces "All Data (CSV)"-exports are broken worse:
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).