Opened 4 years ago

Last modified 3 years ago

#693 new defect

Sponsored Ads on Facebook (in stream sponsored posts)

Reported by: Syntax Assignee: Mailkov
Priority: P3 Milestone:
Module: Adblock-Plus-for-Internet-Explorer Keywords:
Cc: oleksandr Blocked By:
Blocking: Platform: Internet Explorer
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description (last modified by oleksandr)

Environment

Windows 8.1 Update 1 64-bit, IE 11.0.9600.17126, Adblock Plus for Internet Explorer 1.2.636 and Easylist.

Observed behaviour

In-stream sponsored posts are not hidden. But the images from those posts are blocked.

Expected behaviour

Sponsored posts should be blocked and hidden.

Change History (13)

comment:1 Changed 4 years ago by mapx

  • Cc oleksandr added
  • Priority changed from Unknown to P3

comment:2 Changed 4 years ago by mapx

another user wrote:
https://adblockplus.org/forum/viewtopic.php?p=101542#p101542

Yeah, that's the exact behaviour I experienced with ver: 1.1 when it was bugged for me.
The good news is, it can be un-bugged.

Un-install all add-ons (un-install, not disable).
Reboot.
Install ABP & test functionality.

That was all I needed to get ABP working properly.
I then re-installed some of the add-ons I had removed, testing ABP after each install till I found the add-on causing the bug.

Once I had identified the problem add-on I had to repeat the whole process to get ABP working again.
I dumped the bugging add-on (don't miss it) & ABP has worked properly since then. I very, very rarely see any ads or pop ups & when I do they are usually soon corrected with an auto pattern file update.

comment:3 Changed 4 years ago by philll

  • Keywords ie_devbuild_1.2 added

comment:4 Changed 4 years ago by philll

  • Platform set to Internet Explorer

comment:5 Changed 4 years ago by oleksandr

  • Description modified (diff)
  • Keywords ie_devbuild_1.2 removed
  • Ready set
  • Summary changed from Sponsored Ads on Facebook (on the right side) to Sponsored Ads on Facebook (in stream sponsored posts)

comment:6 Changed 3 years ago by Mailkov

I would like to work on this... Can you assign it to me?

comment:7 Changed 3 years ago by oleksandr

  • Owner set to Mailkov

comment:8 Changed 3 years ago by Mailkov

facebook.com##div[id^"topnews_main_stream_"] div[data-ft*="\"ei\":\""]

is the filter that seems do not working.

Now I'm investigating on this defect.

Errors on debug_result.txt :

08:33:33.252 - ===========================================================================================================================================================================================
08:33:33.254 - http://it-it.facebook.com/
08:33:33.256 - ===========================================================================================================================================================================================
08:33:48.551 - Error loading hide filter: div[id^="substream_"] .userContentWrapper > ._1ifo
08:33:48.574 - Error loading hide filter: div[id^="substream_"] div[data-ft*="\"ei\":\""]
08:33:48.599 - Error loading hide filter: div[id^="topnews_main_stream_"] div[data-ft*="\"ei\":\""]
Last edited 3 years ago by Mailkov (previous) (diff)

comment:9 Changed 3 years ago by Mailkov

The problem is in CPluginFilter::AddFilterElementHide and CFilterElementHide::CFilterElementHide.

Code problem is here:

while (!filterString.IsEmpty())
{
    if (filterString.GetAt(0) != chAttrStart)
    {
      DEBUG_FILTER("Filter::Error parsing selector:" + filterText + " (more data)");
      throw std::runtime_error(CStringA("Filter::Error parsing selector:" + filterText + " (more data)").GetString());
    }
...

because, first time of loop

filterString = '[id^"topnews_main_stream_"] div[data-ft*="\"ei\":\""]'

the second time

 filterString = ' div[data-ft*="\"ei\":\""]'

so filterStringGetAt(0)=' ' and chAttrStart='[' and so DEBUG_FILTER starts

Last edited 3 years ago by Mailkov (previous) (diff)

comment:10 Changed 3 years ago by Mailkov

The easier way to solve this defect is to substitute the filter for simpler one.

comment:11 Changed 3 years ago by Mailkov

I spoke with Arthur: it is not possible to change the filter ...
So the only solution is to support it.

Last edited 3 years ago by Mailkov (previous) (diff)

comment:12 Changed 3 years ago by Mailkov

I tried this filter:

facebook.com##div[data-ft*="\"ei\":\""]

and it works and it have the same result of

facebook.com##div[id^"topnews_main_stream_"] div[data-ft*="\"ei\":\""]

Can we divide this into two filter? example:

facebook.com##div[id^"topnews_main_stream_"]

and

facebook.com##div[data-ft*="\"ei\":\""]

oleksandr, How about this?

Last edited 3 years ago by Mailkov (previous) (diff)

comment:13 Changed 3 years ago by Mailkov

pull request https://github.com/adblockplus/adblockplusie/pull/15
this works adding the filter facebook.com##div[data-ft*="\"ei\":\""]

Note: See TracTickets for help on using tickets.