Brave-browser: ads and trackers not displayed on marketwatch - follow up to 1874

Created on 5 Nov 2018  路  7Comments  路  Source: brave/brave-browser

Description

Follow up to https://github.com/brave/brave-browser/issues/1874

If you navigate to marketwatch.com the site hack (not showing the eternally loading banners) works, however if you enable Ads/Tracking, the ads never show. Seems as though the cosmetic filters are not being taken into consideration.

This also happened with browser-laptop.

Steps to Reproduce

  1. Clean profile navigate to marketwatch.com
  2. Verify eternally loading banners are not displayed.
  3. Allow Ads and Tracking from shields.

Actual result:

Ads do not display on the page

Expected result:

Ads should display.

Reproduces how often:

easily

Brave version (brave://version info)

Brave | 0.56.8 Chromium: 70.0.3538.77聽(Official Build)聽(64-bit)
-- | --
Revision | 0f6ce0b0cd63a12cb4eccea3637b1bc9a29148d9-refs/branch-heads/3538@{#1039}
OS | Mac OS X

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds? yes

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields? no
  • Is the issue reproducible on the latest version of Chrome? n/a

Additional Information

OAndroid ODesktop QA Pass - Android ARM QYes bug featurshieldadblock prioritP5 release-noteinclude

Most helpful comment

For release notes: "Improve heuristic for determining first/third-party-ness of ads for default cosmetic filtering"
QA test: the "Handling Script Tags" test on https://dev-pages.brave.software/cosmetic-filtering/text-ads.html

All 7 comments

Safe to close? (Just need to adjust filters to Aggressive on https://www.marketwatch.com/ @LaurenWags

@ryanbr here's what I see with the various shield settings. If you can confirm the below images are expected then I think this is ok to close.

Allow all trackers & ads: ads are displayed on the side and banner ad is displayed:
Screen Shot 2020-11-02 at 7 38 30 AM

Trackers & ads blocked (standard): "Loading" messages shown for side and banner ads:
Screen Shot 2020-11-02 at 7 38 55 AM

Trackers & ads blocked (aggressive): no "Loading" messages shown for side and banner ads:
Screen Shot 2020-11-02 at 7 39 18 AM

Brave | 1.16.68 Chromium: 86.0.4240.111聽(Official Build)聽(x86_64)
-- | --
Revision | b8c36128a06ebad76af51591bfec980224db5522-refs/branch-heads/4240@{#1290}
OS | macOS Version 10.14.6 (Build 18G6032)

Yeah, the non-collapse cosmetic elements seems to be related to first-party. @antonok-edm could confirm ?

Correct, looks like those are currently falling under first-party classification.
cc @pes10k

I've got a solution to this and will put together a PR tomorrow, but the issue is there is some weird non-transitivy with innerText that i didn't account for. Usually innerText gives you the text of the subtree, w/o the text of script nodes. but, innerText on a script node gives you鈥β爐he text of the script node.

I'll fix in a PR asap

For release notes: "Improve heuristic for determining first/third-party-ness of ads for default cosmetic filtering"
QA test: the "Handling Script Tags" test on https://dev-pages.brave.software/cosmetic-filtering/text-ads.html

Verification passed on LG Nexus 5 with Android 5.1 running 1.18.67 Bravearm.apk

  • Verified STR from description
Was this page helpful?
0 / 5 - 0 ratings