Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#7255 closed defect (invalid)

Double pipe causes rule not to match

Reported by: carpetbrain Assignee:
Priority: Unknown Milestone:
Module: Unknown Keywords:
Cc: mapx Blocked By:
Blocking: Platform: Firefox
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Background

I am using Adblock Plus version number 3.4.3 in Firefox on GNU/Linux.

I want to hide the <div> element with the class community-bulletin, on the askubuntu.com, stackoverflow.com, stackexchange.com domains and their subdomains.

First attempt (OK)

The following rules succeed in blocking the desired element on those domains, but risk false positives such as matching such an element on mystackoverflow.com:

askubuntu.com,stackoverflow.com,stackexchange.com##.community-bulletin

or

askubuntu.com##.community-bulletin
stackoverflow.com##.community-bulletin
stackexchange.com##.community-bulletin

Second attempt (possible bug)

To reduce the risk of false positives, I tried using the following rules instead, but neither of them succeed in blocking the <div> element with the class community-bulletin:

||askubuntu.com,||stackoverflow.com,||stackexchange.com##.community-bulletin

or

||askubuntu.com##.community-bulletin
||stackoverflow.com##.community-bulletin
||stackexchange.com##.community-bulletin

Conclusion

So, it seems to me that either:

You might want to block http://example.com/banner.gif as well as https://example.com/banner.gif and http://www.example.com/banner.gif. You can do this by putting two pipe symbols in front of the filter. This ensures that the filter matches at the beginning of the domain name: ||example.com/banner.gif, and blocks all of these addresses while not blocking http://badexample.com/banner.gif or http://gooddomain.example/analyze?http://example.com/banner.gif.

  • or I have misunderstood the documentation
  • or there is a bug in this version of Adblock Plus.

Change History (3)

comment:1 Changed 9 months ago by mapx

You make a confusion between blocking filters and hiding filters.
Pipe symbol is used only for the blocking ones.

In your case (hiding filters) you cannot use pipe symbol (the first part of the filter will always match a domain and not a part of it).
So, stackoverflow.com##.community-bulletin wont ever match mystackoverflow.com##.community-bulletin

Last edited 9 months ago by mapx (previous) (diff)

comment:2 Changed 9 months ago by mapx

  • Cc mapx added

comment:3 Changed 9 months ago by mapx

  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.