From 62ac1841162a8b77bbf76ae7c78156dda5910be5 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 23 Dec 2020 18:42:51 +0000 Subject: [PATCH] replace "~" by " " in getAllQueries response Signed-off-by: Adam Warner --- api_FTL.php | 2 +- api_db.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api_FTL.php b/api_FTL.php index fd4452400..3e1b350ab 100644 --- a/api_FTL.php +++ b/api_FTL.php @@ -323,7 +323,7 @@ { $tmp = explode(" ",$line); // UTF-8 encode domain - $tmp[2] = utf8_encode($tmp[2]); + $tmp[2] = utf8_encode(str_replace("~"," ",$tmp[2])); // UTF-8 encode client host name $tmp[3] = utf8_encode($tmp[3]); array_push($allQueries,$tmp); diff --git a/api_db.php b/api_db.php index 492706713..76b0ca5f8 100644 --- a/api_db.php +++ b/api_db.php @@ -154,7 +154,7 @@ function resolveHostname($clientip, $printIP) break; } // array: time type domain client status upstream destination - $allQueries[] = [$row[0], $query_type, utf8_encode($row[2]), utf8_encode($c), $row[4], utf8_encode($row[5])]; + $allQueries[] = [$row[0], $query_type, utf8_encode(str_replace("~"," ",$row[2])), utf8_encode($c), $row[4], utf8_encode($row[5])]; } } $result = array('data' => $allQueries);