Jean-Tinland / simple-bar

A yabai status bar widget for Übersicht
https://www.jeantinland.com/toolbox/simple-bar
MIT License
1.19k stars 130 forks source link

A backslash (\) present in a window title breaks simple-bar #408

Closed HeySora closed 3 months ago

HeySora commented 3 months ago

Describe the bug PR #402 made the incorrect assumption that newlines were the reason simple-bar's JSON error was occuring. The real reason is that a string such as "test \ haha" is invalid JSON. backslashes need to be escaped. ("test \\ haha" would be valid JSON.) As a matter of fact, I put a backslash in the title of this issue to show the problem. :wink:

To Reproduce

In general, having any window title containing a backslash is enough to trigger the issue. The issue should immediately be visible on your computer, right now, due to this issue's title.

Expected behavior Backslashes are properly escaped in the JSON payload; simple-bar continues working.

Screenshots If applicable, add screenshots to help explain your problem. image image

Information (please complete the following information):

HeySora commented 3 months ago

Oops, an older issue already exists regarding this problem, my bad!

Jean-Tinland commented 2 months ago

Should be fixed now! Feel free to open a new issue if not!