mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-14 19:22:53 -06:00
* Fixes #11758 - replace unsafe chars in menu label * Fixes #11758 - replace unsafe chars in menu label
This commit is contained in:
parent
cfa6b28ceb
commit
0744ff2fa0
@ -1,5 +1,6 @@
|
|||||||
from netbox.navigation import MenuGroup
|
from netbox.navigation import MenuGroup
|
||||||
from utilities.choices import ButtonColorChoices
|
from utilities.choices import ButtonColorChoices
|
||||||
|
from django.utils.text import slugify
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
'PluginMenu',
|
'PluginMenu',
|
||||||
@ -21,7 +22,7 @@ class PluginMenu:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
return self.label.replace(' ', '_')
|
return slugify(self.label)
|
||||||
|
|
||||||
|
|
||||||
class PluginMenuItem:
|
class PluginMenuItem:
|
||||||
|
Loading…
Reference in New Issue
Block a user