mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 16:59:37 -05:00
Add centralized escaping of JSON strings
Enable correct escaping of " character thus removing the need to outlaw "s in comments
This commit is contained in:
@@ -124,7 +124,7 @@ std::string KeyBindingManager::generateJson() const {
|
||||
json << "\"key\": \"" << std::to_string(p.first) << "\",";
|
||||
json << "\"script\": \"" << p.second.command << "\",";
|
||||
json << "\"remoteScripting\": " << (p.second.synchronization ? "true," : "false,");
|
||||
json << "\"documentation\": \"" << p.second.documentation << "\"";
|
||||
json << "\"documentation\": \"" << escapedJson(p.second.documentation) << "\"";
|
||||
json << "}";
|
||||
}
|
||||
json << "]";
|
||||
|
||||
Reference in New Issue
Block a user