Skip to content

Fix attribute filters with quoted attribute names#590

Open
fresh3nough wants to merge 1 commit intobrave:masterfrom
fresh3nough:cody/fix/attribute-filters
Open

Fix attribute filters with quoted attribute names#590
fresh3nough wants to merge 1 commit intobrave:masterfrom
fresh3nough:cody/fix/attribute-filters

Conversation

@fresh3nough
Copy link

ABP-style attribute selectors use quoted attribute names like:
div["data-apiary-widget-name"*="value"]

This is not valid CSS syntax. Standard CSS requires:
div[data-apiary-widget-name*="value"]

The fix normalizes ABP syntax to standard CSS by removing quotes around attribute names before CSS validation. This allows filters from Adblock Plus to work correctly in adblock-rust.

Fixes #438

ABP-style attribute selectors use quoted attribute names like:
  div["data-apiary-widget-name"*="value"]

This is not valid CSS syntax. Standard CSS requires:
  div[data-apiary-widget-name*="value"]

The fix normalizes ABP syntax to standard CSS by removing quotes
around attribute names before CSS validation. This allows filters
from Adblock Plus to work correctly in adblock-rust.

Fixes brave#438
@fresh3nough fresh3nough requested a review from a team as a code owner January 18, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adblocker seems to ignore attribute filters

1 participant