perfectline / validates_url

URL Validation for Rails
MIT License
583 stars 113 forks source link

Allow IDN #153

Closed TimothyAlexisVass closed 6 months ago

TimothyAlexisVass commented 6 months ago

This allows International Domain Names.

TimothyAlexisVass commented 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

TimothyAlexisVass commented 6 months ago

Here is a gem which claims to implement the specifications: https://github.com/deepfryed/idn-ruby