URLs with IPv6 addresses #25

Open
opened 2020-11-19 22:38:57 +00:00 by feld · 1 comment
Owner

Not sure how many variations we want to support, but at a minimum I think we should be able to correctly link with scheme like so:

Bare IPv6 addresses with or without the square brackets would be nice, but probably not worth it. Then we have to make sure we aren't linking an address/prefix... headaches galore. We already have a neat problem with #17

It's funny that GitLab doesn't get this correct either :)

Not sure how many variations we want to support, but at a minimum I think we should be able to correctly link with scheme like so: - http://[2001:db8::1:0] - http://[2001:db8::1:0]:4000 Bare IPv6 addresses with or without the square brackets would be nice, but probably not worth it. Then we have to make sure we aren't linking an `address/prefix`... headaches galore. We already have a neat problem with #17 It's funny that GitLab doesn't get this correct either :)
Author
Owner

I started down this path, but it's quite complicated. We try to do too much with the regex @match_url which is the core of the problem.

We also fail in valid_tld? because IPv6 addresses have colons and we exclude those from valid "hosts" in @get_scheme_host.

Additionally, successfully detecting condensed form addresses like 2607:dba::1 gets tricky even before we add support for the square-bracket format.

I started down this path, but it's quite complicated. We try to do too much with the regex `@match_url` which is the core of the problem. We also fail in `valid_tld?` because IPv6 addresses have colons and we exclude those from valid "hosts" in `@get_scheme_host`. Additionally, successfully detecting condensed form addresses like `2607:dba::1` gets tricky even before we add support for the square-bracket format.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma-elixir-libraries/linkify#25
No description provided.