Comment on I wrote hacky tampermonkey script to fix Lemmy instance links. Any advice?
ezchili@iusearchlinux.fyi 1 year agoYou can find it in action on regex101
Just the port is enough to make it fail but this is not even the point
The sheer number of things you have to take into account to properly parse a URL should convince you to not use regexes for it
Andy@programming.dev 1 year ago
I meant to communicate that the Redirector addon uses the given pattern to see if the entire URL string matches, not part of it. So the malicious URL does not match.
I’m wondering if there’s a real URL for which the Redirector approach will not work.