linkify icon indicating copy to clipboard operation
linkify copied to clipboard

decimal matches link without scheme

Open sqwishy opened this issue 3 years ago • 0 comments

Hi I noticed a number with a decimal point is picked up as a link as long as it's preceded by whitespace.

not a link

1.0

is a link

 1.0

image

This seems like a false positive. Particularly because of the whitespace thing. Also I don't know why "1.0" would be a link but it also matches "1.2.3" regardless of whitespace and I'm not so sure about that one either.

edit okay so my understanding is something like 1.1 isn't really a valid address. it works sometimes ... like you can ping 1.1 and it will try pinging 1.0.0.1 because of a quirk in networking stacks ... but it's like an accident or something. ipcalc 1.1 will tell you "bad IPv4 address"; cool. But then url::Url::parse("http://1.1") parses that as a URL with 1.0.0.1 as the host. So now nothing makes sense.

sqwishy avatar Aug 09 '22 03:08 sqwishy