From 74e63ea897d001e8798fa821fbc84d7035c23e6f Mon Sep 17 00:00:00 2001 From: Joel Adria Date: Fri, 13 Jun 2025 16:36:02 -0400 Subject: [PATCH] fix for plus signs in interface names (eg. UniFi ports) --- netbox_device_view/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox_device_view/utils.py b/netbox_device_view/utils.py index 03a7ac8..f672269 100644 --- a/netbox_device_view/utils.py +++ b/netbox_device_view/utils.py @@ -12,7 +12,7 @@ def process_interfaces(interfaces, ports_chassis, dev): continue # Convert to lowercase and replace common separators with hyphens # This replaces the original regex matching and if/else block - stylename = re.sub(r"[/\.\s]+", "-", itf.name.lower()) + stylename = re.sub(r"[/\.\s\+]+", "-", itf.name.lower()) # Clean up multiple hyphens and leading/trailing hyphens stylename = re.sub(r"-+", "-", stylename).strip("-")