Enigma: Display IDN domains of key users and identities in UTF8

bnet/additions
Aleksander Machniak 4 years ago
parent 36aa132f51
commit 0aa724f73c

@ -3,6 +3,8 @@ CHANGELOG Roundcube Webmail
- Enigma: Fix so key list selection is reset when opening key creation form (#7154)
- Enigma: Fix so using list checkbox selection does not load the key preview frame
- Enigma: Fix generation of key pairs for identities with IDN domains (#7181)
- Enigma: Display IDN domains of key users and identities in UTF8
- Password: Make chpass-wrapper.py Python 3 compatible (#7135)
- Elastic: Fix bug where it was possible to switch editor mode when 'htmleditor' was in 'dont_override' (#7143)
- Elastic: Fix text selection in recipient inputs (#7129)

@ -436,6 +436,14 @@ class enigma_ui
$table->add_header('valid', $this->enigma->gettext('uservalid'));
foreach ($this->data->users as $user) {
// Convert punny-code domain into UTF8
if (($pos = strpos($user->email, '@xn--')) > 0) {
$domain = substr($user->email, $pos + 1);
if ($domain = rcube_utils::idn_to_utf8($domain)) {
$user->email = substr($user->email, 0, $pos + 1) . $domain;
}
}
$username = $user->name;
if ($user->comment) {
$username .= ' (' . $user->comment . ')';
@ -746,7 +754,7 @@ class enigma_ui
$identities = $plugin['identities'];
foreach ($identities as $idx => $ident) {
$name = empty($ident['name']) ? ($ident['email']) : $ident['ident'];
$name = format_email_recipient($ident['email'], $ident['name']);
$attr = array('value' => $idx, 'data-name' => $ident['name'], 'data-email' => $ident['email_ascii']);
$identities[$idx] = html::tag('li', null, html::label(null, $checkbox->show($idx, $attr) . rcube::Q($name)));
}

Loading…
Cancel
Save