brave / brave/adblock-rust

Scriptlet arguments starting with a quote are treated as invalid

Open
#398 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.8k
Forks
250
Avg merge
1d 16h
Merged PRs (30d)
6

Description

The following rule is treated as invalid by adblock-rust because it looks like the first argument is quoted, but there is no matching end quote:

```
example.com##+js(scriptlet-name, "test"!==undefined, 1)
```

However, uBO considers it valid and parses the arguments as `"test"!==undefined` and `1`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the example rule and locate the parser for +js scriptlet arguments. Compare how it handles an argument beginning with a quote against the expected uBO parsing, where the arguments are "test"!==undefined and 1. Done means the rule is accepted and those two arguments are parsed correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.