Comment by Killed_Mufasa on 29/04/2022 at 10:28 UTC

9 upvotes, 2 direct replies (showing 2)

View submission: Amputator has an overactive regex

Hi! Thx for submitting this bug report, much appreciated. This is one of those things I'm well aware of, but are quite difficult to fix properly. There have been cases where actual amp links have something like /ampsomewords in the url. So it's not so straightforward as to just make it a regex that that doesn't trigger when there are alphabetical characters after the amp string. I've recently taken some measures that prevent false positives on certain domains, but I'm kinda hesitant to go further than that, as it would be a lot of maintenance and it could cause false negatives. Personally I feel like it'a better to have false positives than false negatives, but that's a choice we could make.

Again, thx for pointing this out! Once I got some more time, I'll look into this more and run the numbers to see what measures make the most sense. Let me know if you have any more insights!

Replies

Comment by WvBoyScouter at 29/04/2022 at 21:35 UTC

3 upvotes, 1 direct replies

I wonder if it would be possible to split the URL in to subdomain, domain, and split each of the path folders into an array and regex them separately. At least that might be a place to start if it makes sense to fix it.

Comment by GolbatsEverywhere at 11/06/2022 at 20:27 UTC

1 upvotes, 0 direct replies

Another false-positive here:

https://www.reddit.com/r/StLouis/comments/va1n2u/comment/ibzp6ck/?utm_source=reddit&utm_medium=web2x&context=3