Opened 5 months ago

Last modified 5 months ago

#7224 new defect

Generic filter text logged if specific filter with same selector matches

Reported by: greiner Assignee:
Priority: P3 Milestone:
Module: Platform Keywords:
Cc: kzar, sebastian, arthur, mjethani Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

Ubuntu 16.04
Chrome 71
Adblock Plus 3.4.2

How to reproduce

  1. Add the following filters:
    ##body
    example.com##body
    @@||example.com^$generichide
    
  2. Open a new tab and open the Adblock Plus DevTools panel
  3. Navigate to http://example.com/

Observed behaviour

DevTools panel lists the following filters:

  • @@||example.com^$generichide
  • ##body

Expected behaviour

DevTools panel lists the following filters:

  • @@||example.com^$generichide
  • example.com##body

Change History (3)

comment:1 Changed 5 months ago by sebastian

  • Cc mjethani added

We cannot trace the chain of events from an applied element hiding filter -> injected selector -> blocked element. So the best we can do is looking for which injected selector there is a hidden element on the page, and then find a filter that is active on the given domain and has the same selector. Some edge cases giving inaccurate results might be inevitable. However, maybe a workaround for this particular case could be if we have multiple candidates to prefer domain-specific over generic filters.

comment:2 Changed 5 months ago by greiner

Good idea, preferring domain-specific filters should be sufficient to avoid this issue.

comment:3 Changed 5 months ago by sebastian

  • Priority changed from Unknown to P3
  • Ready set
Note: See TracTickets for help on using tickets.