Strings being parsed as a URLs that maybe shouldn't be

image

Also:

  • .com
  • .helloworld
  • .123454jkjfkj--=zvcjkljfd
  • $19.00
1 Like

just pushed a fix for this, the urls listed above are no longer parsed as links.

If you’re curious here’s the stack of regexes I use to determine if there’s links in strings:

urlFromString: https://regexr.com/52r0i

optionally starts with http/s protocol
// followed by alphanumerics
// then ‘.’’
// followed by alphanumerics

then it gets double checked against these:

urlIsFloatOrIp: https://regexr.com/58ii6

matches numbers ‘.’’ numbers …

urlIsCurrencyFloat: https://regexr.com/5bfgm

matches currencySymbol numbers ‘.’ numbers

1 Like