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

Closed
opened 2025-12-29 20:42:43 +01:00 by adam · 2 comments
Owner

Originally created by @gdprdatasubect on GitHub (Dec 2, 2023).

Originally assigned to: @arthanson on GitHub.

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

Originally created by @gdprdatasubect on GitHub (Dec 2, 2023). Originally assigned to: @arthanson on GitHub. ### 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](https://github.com/netbox-community/netbox/assets/101808236/e4828b29-96cc-4cd3-871e-d13bb87c45e9) (Optional: 6. Be annoyed enough by the bug to write a report) ### Expected Behavior No extra lines ### Observed Behavior Lines added
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 20:42:43 +01:00
adam closed this issue 2025-12-29 20:42:43 +01:00
Author
Owner

@gdprdatasubect commented on GitHub (Dec 2, 2023):

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

@gdprdatasubect commented on GitHub (Dec 2, 2023): It just came to my mind to try the other way around too… dcim/interfaces "All Data (CSV)"-exports are broken worse: ![image](https://github.com/netbox-community/netbox/assets/101808236/42cfdf93-9ed0-4ecc-9be0-350442cc4f9f)
Author
Owner

@jeremystretch commented on GitHub (Dec 5, 2023):

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 commented on GitHub (Dec 5, 2023): 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).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8907