Open Sylvhem opened 5 years ago
Following Firefox and Chrome would be good here: display Punycode only if it mixes script because it can dangerous, otherwise show user-friendly string.
https://en.wikipedia.org/wiki/IDN_homograph_attack#Defending_against_the_attack
You can do that easily with ICU, and it is already a dependency of Dino (GTK3 depends on gdk-pixbuf2 which depends on shared-mime-info which depends on libxml2 which depends on ICU; libsoup depends on libxml2 too).
Right now, if a MUC's JID contains non-ASCII characters, it is displayed in Punycode. For example, if a chatroom address is
chat@café.example
, it will be displayed aschat@xn--caf-dma.example
. This is both confusing and taking a lot of space for no value. I think it would be better if Dino displayed those JID in their Unicode encoding.