HTML UI: Selection of an IP should not include heading and trailing spaces #11697

Closed
opened 2025-12-29 21:48:43 +01:00 by adam · 1 comment
Owner

Originally created by @mathieumd on GitHub (Oct 6, 2025).

NetBox version

v4.4.2

Feature type

Other

Proposed functionality

When pasting an IP address copied after triple-clicking it to select it in tables (IPAM Prefixes' IP Addresses tab, Devices or VMs' Interfaces tabs, for example), it get surrounded by spaces:

  • Actual: " 192.0.2.1/24 "
  • Wished: "192.0.2.1/24"

It's caused by the HTML text being actually surrounded by blanks; for example, for IPAM, it goes like this:

<td>

  <a href="/ipam/ip-addresses/123/" id="ipaddress_123">192.0.2.1/24</a>

</td>

If it were straight inside the <td> then it would be fixed:

<td><a href="/ipam/ip-addresses/123/" id="ipaddress_123">192.0.2.1/24</a></td>

Use case

Being able to quickly triple-select values from NetBox UI and use them without surrounding spaces.

Database changes

No

External dependencies

None

Originally created by @mathieumd on GitHub (Oct 6, 2025). ### NetBox version v4.4.2 ### Feature type Other ### Proposed functionality When pasting an IP address copied after triple-clicking it to select it in tables (IPAM Prefixes' `IP Addresses` tab, Devices or VMs' `Interfaces` tabs, for example), it get surrounded by spaces: - Actual: `" 192.0.2.1/24 "` - Wished: `"192.0.2.1/24"` It's caused by the HTML text being actually surrounded by blanks; for example, for IPAM, it goes like this: ```html <td> <a href="/ipam/ip-addresses/123/" id="ipaddress_123">192.0.2.1/24</a> </td> ``` If it were straight inside the `<td>` then it would be fixed: ```html <td><a href="/ipam/ip-addresses/123/" id="ipaddress_123">192.0.2.1/24</a></td> ``` ### Use case Being able to quickly triple-select values from NetBox UI and use them without surrounding spaces. ### Database changes No ### External dependencies None
adam added the type: feature label 2025-12-29 21:48:43 +01:00
adam closed this issue 2025-12-29 21:48:43 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 9, 2025):

Unfortunately removing the occasional extraneous whitespace would take a substantial amount of effort on the template site, and complicate the process of reading and editing those templates. While I understand the utility of your proposal, it's unfortunately not something we can feasibly commit to.

@jeremystretch commented on GitHub (Oct 9, 2025): Unfortunately removing the occasional extraneous whitespace would take a substantial amount of effort on the template site, and complicate the process of reading and editing those templates. While I understand the utility of your proposal, it's unfortunately not something we can feasibly commit to.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11697