twingly/twingly-url

Normalize URL with multiple consecutive dots

Closed this issue · 2 comments

jage commented

From #25 (comment)

Instead of:

irb(main):003:0> Twingly::URL.parse("www..hej..se").to_s
=> "http://www..hej..se"
irb(main):004:0> Twingly::URL.parse("www..hej..se").normalized.to_s
=> "http://www..hej..se/"

It would do this:

irb(main):003:0> Twingly::URL.parse("www..hej..se").to_s
=> "http://www..hej..se"
irb(main):004:0> Twingly::URL.parse("www..hej..se").normalized.to_s
=> "http://www.hej.se/"

We might want to change the behaviour in the .NET-normalization as well: #25 (comment)

Answered in #25 that I don't think these URLs should be valid. If that stands, this issue can be closed without action.

4+ years later I got what I wanted 😄 with #158 these URLs are now considered invalid. This issue can be closed. :)