Skip to content

Bug: Filters containing classes with double dashes are ignored #1885

Closed
@danielyli

Description

@danielyli

Describe the issue

Custom filters that specify an element with a class name that contains a double dash (or double underscore) are ignored. This issue is reproducible for any page with an element whose class name contains a double dash or double underscore.

For example, say I want to block the top navigation bar that peeks in on Medium sites when you scroll the site up. My filter is:

##div.metabar--affixed

The filter is ignored.

(Use this Medium article as the test case.)

If I change the filter selector to specify a class without the double dash, the filter works.

Steps for anyone to reproduce the issue

  1. Add the filter ##div.metabar--affixed
  2. Navigate to https://medium.com/@ageitgey/machine-learning-is-fun-part-4-modern-face-recognition-with-deep-learning-c3cffc121d78.
  3. Observe that the filter is not applied (the top navigation bar still creeps in when scrolling up on the site).

Your settings

All settings are default.

  • Browser/version: Chrome 52.0.2743.116 (64-bit)
  • uBlock Origin version: uBlock Origin v1.8.4
Your filter lists

Default filter lists + the test case specified above

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions