diff --git a/tickets_kanban.php b/tickets_kanban.php index 8bb2eea43..058d4c005 100644 --- a/tickets_kanban.php +++ b/tickets_kanban.php @@ -10,7 +10,7 @@ $statuses = []; while ($status_row = mysqli_fetch_array($status_sql)) { $id = $status_row['ticket_status_id']; - $name = $status_row['ticket_status_name']; + $name = nullable_htmlentities($status_row['ticket_status_name']); $kanban_order = $status_row['ticket_status_order']; $statuses[$id] = new stdClass(); @@ -45,6 +45,13 @@ $ticket_order = $row['ticket_kanban']; $row['ticket_order'] = $ticket_order; // Store the ticket order + // Loop over all items in $row to apply nullable_htmlentities only if the content is a string + foreach ($row as $key => $value) { + if (is_string($value)) { + $row[$key] = nullable_htmlentities($value); + } + } + if (isset($statuses[$id])) { $statuses[$id]->tickets[] = $row; }