Plugin menu label consisting of url unsafe characters breaks unfolding menu #7645

Closed
opened 2025-12-29 20:26:24 +01:00 by adam · 4 comments
Owner

Originally created by @samk-acw on GitHub (Feb 16, 2023).

Originally assigned to: @rganascim on GitHub.

NetBox version

v3.4.4

Python version

3.10

Steps to Reproduce

Create a plugin menu with any url unsafe character (eg. { } / \ # < > ~ | ^) in its label:

menu = PluginMenu(
    label='menu with /slash',
    groups=(
        ('menu item', [menu_item]),
    ),
    icon_class='mdi mdi-format-list-text'
)

After restarting NetBox, open the GUI at the main menu
Click on the plugin menu name

Expected Behavior

The plugin menu opens, showing the menu items.

Observed Behavior

The plugin menu is displayed in the side bar, but does not unfold when clicking on it.

This issue is the same as https://github.com/netbox-community/netbox/issues/10984, only with url unsafe characters instead of spaces, eg { } / \ # < > ~ | ^

Originally created by @samk-acw on GitHub (Feb 16, 2023). Originally assigned to: @rganascim on GitHub. ### NetBox version v3.4.4 ### Python version 3.10 ### Steps to Reproduce Create a plugin menu with any url unsafe character (eg. { } / \ # < > ~ | ^) in its label: ``` menu = PluginMenu( label='menu with /slash', groups=( ('menu item', [menu_item]), ), icon_class='mdi mdi-format-list-text' ) ``` After restarting NetBox, open the GUI at the main menu Click on the plugin menu name ### Expected Behavior The plugin menu opens, showing the menu items. ### Observed Behavior The plugin menu is displayed in the side bar, but does not unfold when clicking on it. This issue is the same as https://github.com/netbox-community/netbox/issues/10984, only with url unsafe characters instead of spaces, eg ` { } / \ # < > ~ | ^`
adam added the type: bugstatus: accepted labels 2025-12-29 20:26:24 +01:00
adam closed this issue 2025-12-29 20:26:25 +01:00
Author
Owner

@jsenecal commented on GitHub (Feb 16, 2023):

Please update the steps to reproduce as they are from the referenced issue. Unless you are implying that 150cb772fe did not fix it.

Create a plugin menu with more than two words, separated by a blank, as its label:

Thanks,

@jsenecal commented on GitHub (Feb 16, 2023): Please update the steps to reproduce as they are from the referenced issue. Unless you are implying that https://github.com/netbox-community/netbox/commit/150cb772fe519404857f48e894737f0570c4bc56 did not fix it. > Create a plugin menu with more than two words, separated by a blank, as its label: Thanks,
Author
Owner

@samk-acw commented on GitHub (Feb 16, 2023):

sorry, copy paste fail. I've updated it now.

@samk-acw commented on GitHub (Feb 16, 2023): sorry, copy paste fail. I've updated it now.
Author
Owner

@jsenecal commented on GitHub (Feb 16, 2023):

sorry, copy paste fail. I've updated it now.

Thanks 😄

@jsenecal commented on GitHub (Feb 16, 2023): > sorry, copy paste fail. I've updated it now. Thanks 😄
Author
Owner

@rganascim commented on GitHub (Feb 25, 2023):

I think we need to modify the PluginMenu class, in the return of the def name (netbox/extras/plugins/navigation.py). Now it only replaces the blank spaces, and if we change to rename all the special chars (prohibited in the html element names) things will work again.

If you want I can try to fix it.

@rganascim commented on GitHub (Feb 25, 2023): I think we need to modify the PluginMenu class, in the return of the def name (netbox/extras/plugins/navigation.py). Now it only replaces the blank spaces, and if we change to rename all the special chars (prohibited in the html element names) things will work again. If you want I can try to fix it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7645