Skip to content

Fix quoted-prefix scriptlet expressions - #708

Open
giri256 wants to merge 1 commit into
brave:masterfrom
giri256:fix/scriptlet-leading-quote-398
Open

Fix quoted-prefix scriptlet expressions#708
giri256 wants to merge 1 commit into
brave:masterfrom
giri256:fix/scriptlet-leading-quote-398

Conversation

@giri256

@giri256 giri256 commented Jul 24, 2026

Copy link
Copy Markdown

Fixes #398

Summary

  • Treat a leading quote as a wrapper only when its closing quote is followed by a comma or the end of the argument list.
  • When an operator follows the closing quote, fall back to comma-delimited parsing and preserve the quote characters, matching uBlock Origin for expressions such as "test"!==undefined and "value"||something.
  • Continue rejecting unmatched quotes and malformed quoted values followed by alphanumeric text, another quote, or a backslash.

Validation

  • cargo fmt --all -- --check
  • cargo test resources::resource_storage::unit_tests --lib (20 passed)
  • cargo clippy --all-targets --all-features -- -D warnings

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