Skip to content

Commit

Permalink
replace "~" by " " in getAllQueries response
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Warner <[email protected]>
  • Loading branch information
PromoFaux committed Dec 23, 2020
1 parent a28f4e4 commit 62ac184
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api_FTL.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion api_db.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 62ac184

Please sign in to comment.