Opened on 11/20/2014 at 01:51:08 PM

Closed on 11/21/2014 at 10:36:03 AM

#1587 closed defect (fixed)

"Block element" generates blocking instead elemhide filters when the selector contains curly brackets

Reported by: sebastian Assignee: sebastian
Priority: P4 Milestone: Adblock-Plus-1.8.8-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5989801094283264

Description

How to reproduce

  1. Click the ABP icon
  2. Choose "Block element"
  3. Choose an element which has an ID or class containing { or } (You might want to use the inspector to produce such a case).
  4. Save the generated filter
  5. Reload the page

Observed behaviour

The curly brackets are escaped as \{ and \} in the generated selector. While this is valid CSS, curly brackets (even if prepended by a backslash) must not occur in elemhide filters. Therefore the filter is interpreted as blocking filter, and doesn't block the relevant element.

Expected behaviour

Curly brackets should be escaped based on their code point, that the filter is interpreted as elemhide filter, and blocks the relevant element.

Attachments (0)

Change History (2)

comment:1 Changed on 11/20/2014 at 01:53:08 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed on 11/21/2014 at 10:36:03 AM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

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 sebastian.
 
Note: See TracTickets for help on using tickets.