From c4938ff0d4cf5028c062dd44b2710f05290582e4 Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Wed, 10 Sep 2025 15:49:59 -0700 Subject: [PATCH] Dashboard Widget Edit: Fix saving rgba color values (#7490) --- core/dashboard/dashboard_widget_edit.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/dashboard/dashboard_widget_edit.php b/core/dashboard/dashboard_widget_edit.php index 3f5b2f2d71..56eb8948f2 100644 --- a/core/dashboard/dashboard_widget_edit.php +++ b/core/dashboard/dashboard_widget_edit.php @@ -81,7 +81,6 @@ //get http post variables and set them to php variables if (!empty($_POST)) { - //$dashboard_uuid = $_POST["dashboard_uuid"] ?? ''; $widget_name = $_POST["widget_name"] ?? ''; $widget_path = $_POST["widget_path"] ?? ''; $widget_icon = $_POST["widget_icon"] ?? ''; @@ -119,10 +118,9 @@ //define the regex patterns $uuid_pattern = '/[^-A-Fa-f0-9]/'; $number_pattern = '/[^-A-Za-z0-9()*#]/'; - $text_pattern = '/[^a-zA-Z0-9 _\-\/.\?:\=#\n]/'; + $text_pattern = '/[^a-zA-Z0-9 _\-\/.\?:\=#\n,()]/'; //sanitize the data - //$dashboard_uuid = preg_replace($uuid_pattern, '', $dashboard_uuid); $widget_name = trim($widget_name); $widget_path = preg_replace($text_pattern, '', strtolower($widget_path)); $widget_icon = preg_replace($text_pattern, '', $widget_icon);