mirror of
https://github.com/pi-hole/web.git
synced 2026-04-22 09:48:56 +01:00
Only try to convert exact domains using the IDN library.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -30,12 +30,14 @@ function getTableContent($type) {
|
||||
|
||||
while($results !== false && $res = $results->fetchArray(SQLITE3_ASSOC))
|
||||
{
|
||||
$utf8_domain = idn_to_utf8($res['domain']);
|
||||
// Convert domain name to international form
|
||||
// if applicable
|
||||
if($res['domain'] !== $utf8_domain)
|
||||
{
|
||||
$res['domain'] = $utf8_domain.' ('.$res['domain'].')';
|
||||
if ($res['type'] === ListType::whitelist || $res['type'] === ListType::blacklist) {
|
||||
$utf8_domain = idn_to_utf8($res['domain']);
|
||||
// Convert domain name to international form
|
||||
// if applicable
|
||||
if($res['domain'] !== $utf8_domain)
|
||||
{
|
||||
$res['domain'] = $utf8_domain.' ('.$res['domain'].')';
|
||||
}
|
||||
}
|
||||
array_push($entries, $res);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user