mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
@@ -47,6 +47,18 @@
|
||||
$data = array_merge($data, getAllQueries());
|
||||
}
|
||||
|
||||
|
||||
function filterArray(&$a) {
|
||||
$sanArray = array();
|
||||
foreach ($a as $k=>$v) {
|
||||
if (is_array($v)) {
|
||||
$sanArray[htmlspecialchars($k)] = filterArray($v);
|
||||
} else {
|
||||
$sanArray[htmlspecialchars($k)] = htmlspecialchars($v);
|
||||
}
|
||||
}
|
||||
return $sanArray;
|
||||
}
|
||||
|
||||
$data = filterArray($data);
|
||||
echo json_encode($data);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user