mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-16 09:37:00 +02:00
Additional formatting in panel for IDN domains
This commit is contained in:
parent
e64cd1de7a
commit
4799d57f77
3 changed files with 17 additions and 1 deletions
|
@ -288,6 +288,9 @@ class HostsController extends Controller
|
|||
$hostIPv6 = $db->select("SELECT addr FROM host_addr WHERE host_id = ? AND ip = 'v6'",
|
||||
[ $host['id'] ]);
|
||||
|
||||
if (strpos($host['name'], 'xn--') === 0) {
|
||||
$host['name'] = idn_to_utf8($host['name'], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
|
||||
}
|
||||
return view($response,'admin/hosts/viewHost.twig', [
|
||||
'host' => $host,
|
||||
'hostStatus' => $hostStatus,
|
||||
|
@ -382,6 +385,9 @@ class HostsController extends Controller
|
|||
$hostIPv6 = $db->select("SELECT addr FROM host_addr WHERE host_id = ? AND ip = 'v6'",
|
||||
[ $host['id'] ]);
|
||||
|
||||
if (strpos($host['name'], 'xn--') === 0) {
|
||||
$host['name'] = idn_to_utf8($host['name'], IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
|
||||
}
|
||||
return view($response,'admin/hosts/updateHost.twig', [
|
||||
'host' => $host,
|
||||
'hostIPv4' => $hostIPv4,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue