Opened on 09/23/2015 at 04:56:15 PM

Closed on 09/24/2015 at 08:58:24 AM

Last modified on 09/24/2015 at 04:38:23 PM

#3114 closed defect (invalid)

Element hiding exception doesn't work

Reported by: Fyren Assignee:
Priority: Unknown Milestone:
Module: Core Keywords:
Cc: greiner, lisabielik Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

Windows 7
Firefox nightly (build ID 20150923030230)
ABP 2.6.10
EHH 1.3.4

How to reproduce

Add the following two rules for hiding elements:

sheap.net##iframe
sheap.net##iframe[src*="timeanddate"]

Visit the following URL:

http://sheap.net/~fyren/ehh.html

For convenience, the HTML for that URL is given here:

<html>
  <body>
    <iframe src="http://www.example.com/"></iframe>
    <iframe src="http://free.timeanddate.com/clock/i3whqzhj/n224/th1/ta1"></iframe>
    <iframe src="http://www.example.com/"></iframe>
  </body>
</html>

Observed behaviour

All three iframes are hidden.

Expected behaviour

Only two iframes should be hidden as the exception should be allowing one of them (according to https://adblockplus.org/en/filters#elemhide_exceptions).

Additonal comment

If instead the following single rule is used, it works as expected:

sheap.net##iframe:not([src*="timeanddate"])

Attachments (0)

Change History (6)

comment:1 follow-up: Changed on 09/24/2015 at 08:58:24 AM by greiner

  • Cc greiner added
  • Component changed from Unknown to Core
  • Resolution set to invalid
  • Status changed from new to closed

Exceptions for hiding filters can only disable existing filters with the same CSS selector. Therefore a filter #@#foo.bar does not have any effect on the filter ##foo.

Also note that there's no exception rule in the filters you mention in the reproduction steps. An exception rule for hiding filters needs to contain #@#.

comment:2 in reply to: ↑ 1 ; follow-up: Changed on 09/24/2015 at 11:48:54 AM by Fyren

Replying to greiner:

Exceptions for hiding filters can only disable existing filters with the same CSS selector. Therefore a filter #@#foo.bar does not have any effect on the filter ##foo.

This doesn't seem very clear to me from the documentation I linked. Where it says "exception rules can disable existing rules on particular domains" it could say "exception rules can only disable..." but even then I probably would have missed the meaning there. Another sentence or two in the documention would help.

Also note that there's no exception rule in the filters you mention in the reproduction steps. An exception rule for hiding filters needs to contain #@#.

Oops, my mistake in typing up the report.

Thanks for the quick response.

comment:3 in reply to: ↑ 2 Changed on 09/24/2015 at 03:53:36 PM by greiner

  • Cc lisabielik added

Replying to Fyren:

This doesn't seem very clear to me from the documentation I linked. Where it says "exception rules can disable existing rules on particular domains" it could say "exception rules can only disable..." but even then I probably would have missed the meaning there. Another sentence or two in the documention would help.

You're right. We could probably phrase that more clearly.

@Lisa Any suggestions on how to improve the documentation to avoid misunderstandings about that?

comment:4 follow-up: Changed on 09/24/2015 at 04:21:33 PM by lisabielik

@greiner @Fyren

What documentation are you referring to? Are you re-writing https://adblockplus.org/en/filters#elemhide_exceptions? Or is there new documentation?

comment:5 in reply to: ↑ 4 ; follow-up: Changed on 09/24/2015 at 04:30:21 PM by greiner

Replying to lisabielik:

What documentation are you referring to? Are you re-writing https://adblockplus.org/en/filters#elemhide_exceptions? Or is there new documentation?

As discussed in the comments above, the expected behavior of element hiding exception filters may not be clearly described by the documentation at https://adblockplus.org/en/filters#elemhide_exceptions where it is described as follows:

  • "Exception rules can disable existing rules on particular domains."
  • "For example, the rule ##div.textad can be disabled on example.com using the exception rule example.com#@#div.textad."

Therefore the question is whether this can/needs to be clarified further.

comment:6 in reply to: ↑ 5 Changed on 09/24/2015 at 04:38:23 PM by lisabielik

Replying to greiner:

Replying to lisabielik:

What documentation are you referring to? Are you re-writing https://adblockplus.org/en/filters#elemhide_exceptions? Or is there new documentation?

As discussed in the comments above, the expected behavior of element hiding exception filters may not be clearly described by the documentation at https://adblockplus.org/en/filters#elemhide_exceptions where it is described as follows:

  • "Exception rules can disable existing rules on particular domains."
  • "For example, the rule ##div.textad can be disabled on example.com using the exception rule example.com#@#div.textad."

Therefore the question is whether this can/needs to be clarified further.

Coming from a user's perspective (whether familiar with these rules or not), I would suggest to add a reason why "Exception rules can disable existing rules on particular domains." Can exception rules ONLY disable existing rules on particular domains? If so, which domains and why on those domains?

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
 
Note: See TracTickets for help on using tickets.