diff options
author | vaxerski <[email protected]> | 2023-01-11 12:17:27 +0100 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-01-11 12:17:27 +0100 |
commit | b24f066c4799ac66cc86c0962447c690519df8ef (patch) | |
tree | e1387b3ca952a4fb875b0d24ca3c2f286bb90ae2 | |
parent | 4ec034ad49d1f03ec4cd68ca0a09e2f781166b16 (diff) | |
download | Hyprland-b24f066c4799ac66cc86c0962447c690519df8ef.tar.gz Hyprland-b24f066c4799ac66cc86c0962447c690519df8ef.zip |
escape json strings in hyprctl binds
-rw-r--r-- | src/debug/HyprCtl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index f47c44f4..b42e787b 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -503,8 +503,8 @@ std::string bindsRequest(HyprCtl::eHyprCtlOutputFormat format) { "dispatcher": "%s", "arg": "%s" },)#", - kb.locked ? "true" : "false", kb.mouse ? "true" : "false", kb.release ? "true" : "false", kb.repeat ? "true" : "false", kb.modmask, kb.submap.c_str(), - kb.key.c_str(), kb.keycode, kb.handler.c_str(), kb.arg.c_str()); + kb.locked ? "true" : "false", kb.mouse ? "true" : "false", kb.release ? "true" : "false", kb.repeat ? "true" : "false", kb.modmask, + escapeJSONStrings(kb.submap).c_str(), escapeJSONStrings(kb.key).c_str(), kb.keycode, escapeJSONStrings(kb.handler).c_str(), escapeJSONStrings(kb.arg).c_str()); } ret.pop_back(); ret += "]"; |