perfectline / validates_url

URL Validation for Rails
MIT License
582 stars 114 forks source link

Allow IDN #153

Closed TimothyAlexisVass closed 5 months ago

TimothyAlexisVass commented 5 months ago

This allows International Domain Names.

TimothyAlexisVass commented 5 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 5 months ago

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