Skip to content

Issue 7423 - Stop relying on the filterValidation module

As discussed in IRC, with this change we're no longer validating the CSS selectors.

Edit: For reference here's my IRC message:

15:07 <kzar> I'm inclined to no longer validate the CSS selector
             inside element hiding filters when users adds them,
             otherwise we're going to have to go to some lengths to
             do it. Something like instead of returning an array of
             error messages, importRaw would have to return a map
             of line numbers to errors and a map of line numbers to
             selectors. Then the consumer would have to validate
             all those selectors, combine any failures wit
15:07 <kzar> h the errors (if any) to display to the user. Then, if
             there wasn't already any errors, the consumer would
             have to send further message to remove all filters we
             just added again to make the behaviour consistent. I
             think especially for the use of pasting in EasyList
             into the box (yea people did that before) it's going
             to get messy
15:08 <kzar> The alternative would be to pass the the filter text
             to the background page twice, parsing them all twice,
             the first time just returning selectors and error
             messages, the second time actually adding them.

See also #383 (closed)

Edited by Thomas Greiner

Merge request reports

Loading