Opened 6 years ago

Closed 5 years ago

#491 closed defect (fixed)

Element hiding breaks if user adds a custom filter with invalid CSS selector

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.8.8-for-Chrome-Opera-Safari
Module: User-Interface Keywords:
Cc: philll, trev, smultron45@… Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5279235799252992

Description (last modified by sebastian)

Environment

Chrome, Opera and Safari

How to reproduce

  1. Go to Options -> Add your own filters
  2. Add an element hiding filter using an invalid CSS selector, e.g. ##div[attr="foo']
  3. Open any website

Observed behaviour

Ads are not removed by element hiding. You also see following error in the JavaScript console: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule.

Expected behaviour

The options UI should reject to save filters that lead to errors when applied.

Change History (14)

comment:1 Changed 6 years ago by mapx

  • Cc smultron45@… added

comment:2 Changed 6 years ago by sebastian

See #493 and #494 for the corresponding issues in Adblock Plus for Firefox.

comment:3 Changed 6 years ago by sebastian

  • Ready set

comment:4 Changed 5 years ago by seannaM

I've put some work into this and I'm making good progress. Can I be assigned the issue?

comment:5 Changed 5 years ago by fhd

  • Owner set to seannaM

Done!

comment:6 Changed 5 years ago by seannaM

I believe I have a working solution. You can see my approach here:

https://github.com/evilseanbot/adblockpluschrome/tree/iss491

comment:7 Changed 5 years ago by trev

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

comment:8 Changed 5 years ago by sebastian

  • Cc sebastian removed

comment:9 Changed 5 years ago by sebastian

  • Blocked By 1583 added

comment:10 Changed 5 years ago by sebastian

  • Blocked By 1583 removed
  • Description modified (diff)
  • Owner changed from seannaM to sebastian
  • Platform set to Unknown

comment:11 Changed 5 years ago by sebastian

  • Blocking 1583 added

comment:12 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)

comment:13 Changed 5 years ago by sebastian

  • Blocking 1583 removed

comment:14 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.