diff --git a/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php b/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php index 7789d38..f07c9d1 100644 --- a/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php +++ b/src/usr/local/emhttp/plugins/fanctrlplus2/Fanctrl2Dashboard.php @@ -60,11 +60,10 @@ $fans[] = [ 'label' => $label, - 'temp' => ($temp_val === "*" ? "*" : "{$temp_val}°C"), 'temp_raw' => $temp_val, 'temp_origin' => $temp_origin, 'rpm_val' => $rpm_val, - 'percent' => ($pct_val === "-" ? "-" : "{$pct_val} %"), + 'percent' => $pct_val, 'status' => $status ]; } diff --git a/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page b/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page index 8b9393c..e8d4c7c 100644 --- a/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page +++ b/src/usr/local/emhttp/plugins/fanctrlplus2/FanctrlPlus2.Dashboard.page @@ -48,33 +48,26 @@ foreach ($cfg_files as $path) { // Build the HTML rows. $fan_rows = ""; foreach ($all_cfg as $cfg) { - $file = $cfg['file']; - $label = $cfg['custom'] ?? $file; - // Skip unnamed fans. if (empty($cfg['custom'])) continue; + $label = htmlspecialchars($cfg['custom'], ENT_QUOTES, 'UTF-8'); $fan_rows .= << - - $label - - -- - - - - -- - / - -- - - -- - + +
+ $label + -- + + -- + -- + -- + - +
ROW; } @@ -91,74 +84,42 @@ echo <<