brave/adblock-rust

Generic cosmetics exceptions are being ignored.

Opened this issue · 1 comments

I have seen this issue in Brave for years with the generic cosmetics exceptions are being totally ignored by Brave's adblocker. Don't know the cause though, if it is just not supported or it is bugged, but it should be fixed or supported because I see now the negative effects this is causing in many websites.

Many anti-adblockers are using the: If element = display: none, then = Adblocker.

uBlock Filters has many generic cosmetics exceptions to deal with this and lines like this

  • Where to see this issue? The easiest way I found to test this:
    Go to tvnet.lv and you should see adblocker being detected, that's because Easylist is blocking the element and uBlock is trying to whitelist it and Brave is just not working with the generic exception uBlock list has.

If you add:
tvnet.lv#@#.adBanner
to the custom filters, it should work just fine, because the exceptions are working if you add the domain, but not as generic like uBlock list has it and works properly with it.

These is another example to show this problem:

https://links.medipost.org/6qTD

medipost.org#@#.ad-banner
medipost.org#@##ad-banner

So basically the issue is how Brave can use generic cosmetics but not generic cosmetic exceptions, some pages sometimes need $ghide because their implementations detects more blocked DOM elements than just those two, and sometimes they are random, which is more problematic. But that's why in uBlock those websites work fine without being detected and not in Brave

Thank you.

@TheVampireInLoveWithTheCorpsesBlood I discussed this with @ryanbr - it appears generic cosmetic exceptions are primarily used in uBO as the equivalent of $badfilter for existing generics from EL/EP. We'll be focusing on converting those generic cosmetic rules to site-specific ones and using $generichide where necessary, since this will make the lists work better for everyone.