Closed kevinswartz closed 1 year ago
Wow, that's quite a url! And I guess Safari suffers from a slow regex backtracking algorithm :(
Hmm, will have to investigate.
PRs always welcome btw!
Basically rewrote the URL parser from scratch and it no longer has this issue in Safari. Will be released in v4.0
That's fantastic, I'll give it a try. Thanks @gregjacobs !
I'll let you know when v4.0 is released - I'm almost done with it :)
Ok this is now released in v4.0.0. Give it a try!
Best, Greg
Looks like it's fixed to me. Thanks for your help!
Awesome and glad to hear!
Best, Greg
Hey guys, Great plugin! We recently ran into a weird case with a weird link.
I use Autolinker.parse() on user-submitted text to detect links, and in one case, a link is taking Safari (v14.1.2) about 3 seconds to parse. In Chrome (v93.0.4577), the same link is parsed in ~50ms. We have also seen this happen in Mobile Safari.
Here's the link:
I can reproduce using Autolinker v3.14.3. I'm also creating a single instance of Autolinker to call parse on so that it's not re-created in a loop.
Let me know if you need anything else. Thanks!