Closed TimothyAlexisVass closed 6 months ago
I'm sorry, this is incomplete because it will allow http://$$$.com which should be invalid. It is a lot more complicated. IDNs are specified by Network Working Group RFC 3490: Internationalizing Domain Names in Applications (IDNA): The algorithm is specified here: https://rfc-annotations.research.icann.org/rfc3490.html#section-4
Here is a gem which claims to implement the specifications: https://github.com/deepfryed/idn-ruby
This allows International Domain Names.