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

Putting " \ " in the config.jsonc will crash waybar in any module or module name or format types etc. #3675

Closed
Set2Minecraft opened this issue Oct 10, 2024 · 2 comments
Labels
bug Something isn't working custom

Comments

@Set2Minecraft
Copy link

Waybar v0.11.0

To reproduce, add a \ into any part of the config that is uncommented, does not matter if module with \ is called or not, if its just a name or part of the formatting output

@github-actions github-actions bot added bug Something isn't working custom labels Oct 10, 2024
@RobertMueller2
Copy link
Contributor

RobertMueller2 commented Oct 12, 2024

I wouldn't call that a crash. Waybar doesn't start because the config file is invalid that way. Not starting when the config is not valid sounds entirely sensible to me.

Outside of strings, \ is not a valid character in json, and inside of strings, \ starts an escape sequence in json. If you want to use \ in a string in json, you have to escape it like \\.

See
https://datatracker.ietf.org/doc/html/rfc8259
https://ecma-international.org/publications-and-standards/standards/ecma-404/
for details. Jsonc is a superset of json, so the same considerations apply to it.

I don't think there's a bug here.

@Set2Minecraft
Copy link
Author

Oh, yea I would agree. I have only used jsonc for waybar so I had no idea, thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working custom
Projects
None yet
Development

No branches or pull requests

2 participants