
Loading…
[Request] Option to ignore "Whitelists" sections in 3rd-party filters #915
that is how Adblock Plus handles them
Can you explain what you mean?
Let's say some webpage makes an XMLHttpRequest, to which two filters apply: one blocks it and the other is in the "Whitelists" section. Adblock Plus blocks the request, uBlock allows it. So I guess Adblock Plus either ignores the whole "Whitelists" section or just gives the blocking filter higher priority.
Here's an example page You have this XMLHttpRequest here, to which these two filters apply:
1. the "@@/player/vidAS=pre_roll" filter from the "Whitelists" section of the "POL: Adblock Polska" 3rd-party filter
2. the "||csr.onet.pl^" blocking filter from this 3rd-party filter
When Adblock Plus is used, the request is blocked. When uBlock is used, it's not blocked and an ad appears before the video.
@konto-andrzeja ah, got it. I had thought about this, too.
So, it's really being able to configure µBlock to ignore exception rules from 3rd-party filter lists, right?
Adblock Plus blocks the request, uBlock allows it
No, this is not true: ABP prioritizes exception filters. uBlock does the same, i.e. it respects the semantic.
This has been requested before, and aside a handful of users, it's very unlikely to be useful to most users, as this would likely breaks the pages/sites these exceptions are meant to un-break. I looked into the POL list, and I don't see anything out of order: the exceptions in there are mostly narrow, so clearly they are meant to un-break pages.
You have two options:
Use the
importantfilter option applied to a block filter allows it to override exception filters.Use dynamic filtering: dynamic filtering override static filtering.
No, this is not true: ABP prioritize exception filters. uBlock does the same, i.e. it respects the semantic.
Well, I've just tested it and it behaves exactly how I described it: when ABP is enabled, the ad doesn't play and when uBlock is enabled, it does.
I got the ad with ABP, using same exact lists as uBlock.
So, it's really being able to configure µBlock to ignore exception rules from 3rd-party filter lists, right?
@chrisaljoudi Yes, exactly. I didn't know that those were called "exception rules", that's why I kept referring to them as filters from the "Whitelists" section. Thanks for the clarification.
To quote @gorhill:
I got the ad with ABP, using same exact lists as uBlock.
Same here. Are you sure the filter lists are the same and up-to-date in ABP? (You can force an update in the settings).
Well, for some reasons, it appears I sometimes get the ad with ABP, sometimes not. With uBlock it looks like I get it everytime.
This would need more investigation.
For sure, exception filters are meant to bypass block filters, I can guarantee you it's by design, and you can check yourself by asking ABP on their own forum. The filter documentation says so.
Now if I use /player/vidas=pre_roll$important, it seems the ad is skipped in uBlock.
I would need to investigate why this appears random with ABP, sometimes it is skipped, sometimes not.
I've just found out that when I remove every list and use only the two custom filters I've mentioned above ("@@/player/vidAS=pre_roll" and "||csr.onet.pl^") ABP and uBlock both allow the ad to play.
When I remove everything except for the two lists I've mentioned above (this one an this one) ABP blocks the ad every time.
This has been requested before, and aside a handful of users, it's very unlikely to be useful to most users, as this would likely breaks the pages/sites these exceptions are meant to un-break. I looked into the POL list, and I don't see anything out of order: the exceptions in there are mostly narrow, so clearly they are meant to un-break pages.
For me the exception rules from the "POL: Adblock Polska" look like they're meant to allow ads on some sites (TVN is a Polish TV station which definitely can afford paying for allowing their ads). The site I've mentioned above works fine without those exception rules - it just doesn't play the ad.
But I get it that exception rules in general are meant to un-break pages, so they cannot be ignored. For now I'll just disable the whole "POL: Adblock Polska" list, but it would be nice to be able to disable only those exception rules in some convenient way.
I need to investigate tomorrow why the difference between uBlock/ABP, but it's not because of the @@/player/vidAS=pre_roll filter, there is something else going on.
As suggested, you can also use /player/vidas=pre_roll$important as custom filter, this will completely cancel the exception @@/player/vidAS=pre_roll.
Tomorrow I will look into finding out why the result differs between ABP/uBlock.
As suggested, you can also use /player/vidas=pre_roll$important as custom filter, this will completely cancel the exception @@/player/vidAS=pre_roll.
I can, but I would have to add such a filter for every exception rule from that list, which is not very convenient. But thanks for the tip, it's nice to know it's possible.
@konto-andrzeja i was thinking about creating issue in Adblock_PL_List about too much whitelisting, but I see that last update is from november. @adblockpolska mention about moving to EasyList servers, so I do some search and discover actively updated list from certificate.it
Probably found the problem. This filter:
||ecache*.cdn.onet.pl/suso/?host=rtvnmw52e.mm.onet.pl
In POL. uBlock will extract and use as keyword ecache in order to quickly lookup filter entries in the dictionary. However uBlock ends up never finding the request because the URL to filter looks like:
http://ecache2.m10r2.cdn.onet.pl/suso/?host=dtvnmw53e.mm.onet.pl&file=8af24...
For which the extracted keyword is ecache2, thus not matching ecache, thus never looking up the filter above.
Fix is to never use as token something which is followed by a *.
@gwarser Thank you for this new list, it certainly doesn't have those strange exception rules from Adblock_PL_List and ads are blocked like they should be.
If you think Adblock polskie reguly should replace Adblock_PL_List, please open a new issue, so that I remember to do it.
This is fixed so as to interpret correctly filters like
||ecache*.cdn.onet.pl/suso/?host=rtvnmw52e.mm.onet.pl
in the current case.
However, though this helps prevent the ad from showing up most of the time, it does once in a while show up, but this happens also with ABP: the reason is because the filter above in the POL list doesn't cover all instances of URLs resembling:
http://ecache2.m10r2.cdn.onet.pl/suso/?host=dtvnmw53e.mm.onet.pl&file=8af24...
The filter needs to be rewritten to something like:
||ecache*.cdn.onet.pl/suso/?host=rtvnmw*.mm.onet.pl
Of course there is the other issue of questionably having an exception @@/player/vidAS=pre_roll, but that is another issue which should be brought to the list maintainer(s). As far as uBlock is concerned, there was indeed a bug, and the bug is fixed.
The filter needs to be rewritten to something like:
one more difference ...host=rtv... vs ...host=dtv...

I have the "POL: Adblock Polska" 3rd-party filter enabled. It has the "Whitelists" section, which allows some ads to show, even when other filters block them.
I would really like an option to ignore those "Whitelists" sections in 3rd-party filters or at least for them to have lower priority than blocking filters (that is how Adblock Plus handles them).