VscodeAdblockSyntax
VscodeAdblockSyntax copied to clipboard
Add support for unescaped commas within strings in uBO scriptlet injections
uBO has started to support using quotes in values https://github.com/uBlockOrigin/uAssets/blob/562d4c6043f38ec3786dc34119d26e711140d6cf/filters/annoyances-cookies.txt#L124 I see that the quoted value still has commas colored in red.
Originally posted by @peace2000 in https://github.com/AdguardTeam/VscodeAdblockSyntax/issues/95#issuecomment-1842587463
See
- https://github.com/uBlockOrigin/uAssets/commit/67c390448a451caec1c1b744082616ed7bca4dc9
- https://github.com/gorhill/uBlock/commit/027c7a4fb5b74207b7dedcbc83f4c70527ea5566
Thanks for opening this.
We typically quote parameters only if it's necessary, but all the variations should be highlighted properly, whether quoted or not. (Also the scriplet name can be quoted nowadays, but uBO doesn't have a scriptlet name that contains a comma :) )
example.com##+js(trusted-set-cookie, ConsentChecked, '{"userHasSetCookies":true,"marketingCookies":false}')
example.com##+js(trusted-set-cookie, 'Consent,Checked', '{"userHasSetCookies":true,"marketingCookies":false}')
example.com##+js(trusted-set-cookie, 'Consent,Checked', true)
example.com##+js('trusted-set-cookie', 'Consent,Checked', true)
example.com##+js('trusted-set-cookie', ConsentChecked, true)
All those should be highlighted correctly.