Skip to content

Commit

Permalink
Escape SCSS selectors in dashboard widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric-anne authored and trasher committed Nov 6, 2024
1 parent 12e3366 commit 9aa47ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Dashboard/Widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ public static function pie(array $params = []): string
$dark_bg_color = Toolbox::getFgColor($p['color'], 80);
$dark_fg_color = Toolbox::getFgColor($p['color'], 40);

$chart_id = "chart-{$p['cache_key']}";
$chart_id = Toolbox::slugify("chart-{$p['cache_key']}");

$class = "pie";
$class .= $p['half'] ? " half" : "";
Expand Down Expand Up @@ -1038,7 +1038,7 @@ private static function getBarsGraph(

$animation_duration = self::$animation_duration;

$chart_id = 'chart_' . $p['cache_key'];
$chart_id = Toolbox::slugify('chart_' . $p['cache_key']);

$class = "bar";
$class .= $p['horizontal'] ? " horizontal" : "";
Expand Down Expand Up @@ -1484,7 +1484,7 @@ private static function getLinesGraph(
$json_labels = json_encode($labels);
$json_series = json_encode($series);

$chart_id = 'chart_' . $p['cache_key'];
$chart_id = Toolbox::slugify('chart_' . $p['cache_key']);

$fg_color = Toolbox::getFgColor($p['color']);
$line_color = Toolbox::getFgColor($p['color'], 10);
Expand Down

0 comments on commit 9aa47ed

Please sign in to comment.