diff options
| author | winter Sparkles | 2026-07-02 19:07:41 +0100 |
|---|---|---|
| committer | winter Sparkles | 2026-07-02 19:07:41 +0100 |
| commit | e14f4b88e77b380afa8e40e1e66f48772515e95c (patch) | |
| tree | 9992c008bf21315dc880b10c38a387c55cbfcc24 /Digitigrade | |
| parent | d9bf17761d6b770e8e56c642a8fa0f8e460a662f (diff) | |
add IDN support in various ui places
Diffstat (limited to 'Digitigrade')
| -rw-r--r-- | Digitigrade/Model/Actor.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Digitigrade/Model/Actor.php b/Digitigrade/Model/Actor.php index 0e2a9c5..b452703 100644 --- a/Digitigrade/Model/Actor.php +++ b/Digitigrade/Model/Actor.php @@ -393,8 +393,10 @@ class Actor extends PushableModel implements RpcReceiver { return $instances; } - public function getFullHandle(bool $alwaysIncludeDomain = false): string { - return $this->handle . (($alwaysIncludeDomain || !$this->isLocal) ? '@' . hostname_from_uri($this->uri) : ''); + public function getFullHandle(bool $alwaysIncludeDomain = false, bool $convertIdn = false): string { + $domain = hostname_from_uri($this->uri); + if ($convertIdn) $domain = idn_to_utf8($domain); + return $this->handle . (($alwaysIncludeDomain || !$this->isLocal) ? '@' . $domain : ''); } public function getLocalUiHref(): string { |
