From 54484dedd5a5c5343806c84928340e9e3870e370 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 28 Aug 2024 12:57:27 -0600 Subject: [PATCH] Update dashboard content widget --- core/dashboard/index.php | 7 +++++-- core/dashboard/resources/dashboard/content.php | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/core/dashboard/index.php b/core/dashboard/index.php index 94360508da..7c77ca16d8 100644 --- a/core/dashboard/index.php +++ b/core/dashboard/index.php @@ -536,9 +536,11 @@ function toggle_grid_row_end_all() { $dashboard_target = trim(preg_replace($text_pattern, '', $dashboard_target)); $dashboard_width = trim(preg_replace($text_pattern, '', $dashboard_width)); $dashboard_height = trim(preg_replace($text_pattern, '', $dashboard_height)); - $dashboard_content = trim(preg_replace($text_pattern, '', $dashboard_content)); + $dashboard_content = preg_replace($text_pattern, '', $dashboard_content); + $dashboard_content = str_replace("\n", '
', $dashboard_content); $dashboard_content_text_align = trim(preg_replace($text_pattern, '', $dashboard_content_text_align)); - $dashboard_content_details = trim(preg_replace($text_pattern, '', $dashboard_content_details)); + $dashboard_content_details = preg_replace($text_pattern, '', $dashboard_content_details); + $dashboard_content_details = str_replace("\n", '
', $dashboard_content_details); $dashboard_chart_type = preg_replace($text_pattern, '', $dashboard_chart_type); $dashboard_label_text_color = preg_replace($text_pattern, '', $dashboard_label_text_color); $dashboard_number_text_color = preg_replace($text_pattern, '', $dashboard_number_text_color); @@ -660,3 +662,4 @@ function toggle_grid_row_end_all() { require_once "resources/footer.php"; ?> + diff --git a/core/dashboard/resources/dashboard/content.php b/core/dashboard/resources/dashboard/content.php index daec932471..dbae532a8b 100644 --- a/core/dashboard/resources/dashboard/content.php +++ b/core/dashboard/resources/dashboard/content.php @@ -18,12 +18,13 @@ echo "
\n"; echo "
\n"; echo " ".escape($dashboard_name).""; - echo " ".str_replace("\r", '
', escape($dashboard_content))."
\n"; + echo " ".$dashboard_content."\n"; echo "
\n"; if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { - echo "
".str_replace("\r", '
', escape($dashboard_content_details))."
\n"; + echo "
".$dashboard_content_details."
\n"; } echo " "; echo "
\n"; ?> +