From afc3ea26c4d9db4d6eaedac2c91af78e01306fd6 Mon Sep 17 00:00:00 2001 From: Isabelle Date: Wed, 31 Dec 2025 14:49:46 +0100 Subject: [PATCH] feat(extra-features): Use word boundary to avoid matching patrial attr. (e.g., width vs stroke-width) --- is_themecore/src/Core/Smarty/SmartyHelperFunctions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php b/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php index 39220c2..6c32799 100644 --- a/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php +++ b/is_themecore/src/Core/Smarty/SmartyHelperFunctions.php @@ -245,7 +245,7 @@ class SmartyHelperFunctions $value = $params[$attr]; // Check if attribute already exists in the SVG - if (preg_match('/' . preg_quote($attr) . '="[^"]*"/', $svg_content)) { + if (preg_match('/\b' . preg_quote($attr) . '="[^"]*"/', $svg_content)) { // Replace existing attribute $svg_content = preg_replace( '/' . preg_quote($attr) . '="[^"]*"/',