franckverrot / activevalidators

Collection of ActiveModel/ActiveRecord validators
https://rubygems.org/gems/activevalidators
MIT License
306 stars 49 forks source link

All URLs containing non-ASCII characters are considered invalid #111

Open goulvench opened 2 years ago

goulvench commented 2 years ago

The current URL validation relies on URI.parse, from the standard library, which only works with ASCII. The following valid URLs are therefore rejected: 'http://example.com/caractère-accentué', 'http://ουτοπία.δπθ.gr'. The Addressable gem correctly parses these URLs, and could be used as a drop-in replacement instead. Would you be interested in a PR?

franckverrot commented 2 years ago

Yes, makes total sense, thanks in advance 🙏🏽

goulvench commented 2 years ago

Took a while because I've a lot on my plate but here it is: #112.