mmriis / simpleidn

SimpleIDN ruby gem
MIT License
70 stars 14 forks source link

uri parse fail #10

Closed mturnaviotov closed 7 years ago

mturnaviotov commented 8 years ago

fail case:

SimpleIDN.to_ascii('http://домен.укр/')
=> "xn--http://-5ggj3emj.xn--/-stbsk" estimated result for valid: SimpleIDN.to_ascii('http://домен.укр') => "http://xn--d1acufc.xn--j1amh/"

URI.parse fails on non ascii domains, so it will be good for regex, which drop all non-domain name content via regexp.

mmriis commented 7 years ago

Sanitize your input. SimpleIDN isn't doing anything wrong.