Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for unescaped commas within strings in uBO scriptlet injections #121

Open
scripthunter7 opened this issue Dec 6, 2023 · 2 comments
Assignees
Labels
Priority: P4 T: syntax highlighter The issue is related to the syntax highlighting

Comments

@scripthunter7
Copy link
Member

scripthunter7 commented Dec 6, 2023

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 #95 (comment)

@scripthunter7 scripthunter7 added the T: syntax highlighter The issue is related to the syntax highlighting label Dec 6, 2023
@scripthunter7
Copy link
Member Author

@peace2000
Copy link

peace2000 commented Dec 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P4 T: syntax highlighter The issue is related to the syntax highlighting
Projects
None yet
Development

No branches or pull requests

4 participants