-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox version
v3.6.1
Python version
3.11
Steps to Reproduce
- On an existing device, create an interface labeled something like "One Two".
- Go to the interface tab of that device, check the checkbox next to it and hit "rename".
- In the find field, enter "One " (note the trailing space!). In the replacement field enter "One-".
- Click the preview button.
Expected Behavior
NetBox should offer to rename the device to "One-Two".
Observed Behavior
Netbox offers to rename the device to "One- Two" (note the space).
My guess (I've not looked at the code) is that this happens because django autostrips whitespace from input fields by default, and this needs to be disabled.
Also, the same bug exists on the "replace" field, and is completely analagous to the replace field.
Workaround: For the "find" field, use regex mode and \s to match trailing whitespace. For the "replace" field, I don't know of a general workaround.
Metadata
Metadata
Assignees
Labels
severity: lowDoes not significantly disrupt application functionality, or a workaround is availableDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application