Skip to content

Conversation

@fresh3nough
Copy link

Fixes #398 - Allow scriptlet arguments containing JavaScript expressions that start with quoted strings but are not fully quoted. For example:

  • "test"!==undefined
  • "value"||something

The parser now falls back to comma-separated parsing when it detects an operator after a closing quote, treating the entire expression as a single unquoted argument. Malformed quoted arguments (like unmatched quotes or quotes followed by alphanumeric characters) are still properly rejected.

This change increments ADBLOCK_RUST_DAT_VERSION to 4 as it affects which filters are considered valid and thus changes serialization.

Fixes brave#398 - Allow scriptlet arguments containing JavaScript expressions
that start with quoted strings but are not fully quoted. For example:
- "test"!==undefined
- "value"||something

The parser now falls back to comma-separated parsing when it detects
an operator after a closing quote, treating the entire expression as
a single unquoted argument. Malformed quoted arguments (like unmatched
quotes or quotes followed by alphanumeric characters) are still
properly rejected.

This change increments ADBLOCK_RUST_DAT_VERSION to 4 as it affects
which filters are considered valid and thus changes serialization.
@fresh3nough fresh3nough requested a review from a team as a code owner January 18, 2026 18:29
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.

Scriptlet arguments starting with a quote are treated as invalid

1 participant