From d80f3acca84fa32bda39c74fce0c0a7de746bdc0 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 20 Oct 2025 12:20:22 +0200 Subject: [PATCH] Fix bonifica SVG --- Lux.API/Controllers/WindowController.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index 19a05e9e..ba65ee5f 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -160,6 +160,7 @@ namespace Lux.API.Controllers // ...se ricevo percorso --> leggo jwd/svg cablato if (!string.IsNullOrEmpty(id)) { + // bonifica nome svg da svgContent = _imgService.LoadSvg(id); } sw.Stop(); @@ -189,6 +190,11 @@ namespace Lux.API.Controllers { id = id.Replace(".svg", ""); } + // se contiene i caratteri casuali x forzare reload --> li levo + if(id.Contains("-")) + { + id = id.Substring(0, id.IndexOf("-")); + } string svgContent = await _imgService.LoadSvgAsync(id, env); // se vuoto --> leggo img logo...