mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 03:36:32 +01:00
WebSockets: also json-escape strings in state messages
This commit is contained in:
parent
946094b25c
commit
dbb26daafa
7 changed files with 82 additions and 29 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <sstream>
|
||||
|
||||
#include "message.h"
|
||||
#include "json.h"
|
||||
|
||||
// JSON does not support Infinity or NaN
|
||||
#define XSTR(s) STR (s)
|
||||
|
|
@ -166,7 +167,7 @@ NodeStateMessage::serialize (void* buf, size_t len) const
|
|||
break;
|
||||
}
|
||||
case TypedValue::String:
|
||||
ss << '"' << static_cast<std::string> (val) << '"';
|
||||
ss << '"' << Json::escape (static_cast<std::string> (val)) << '"';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue