Probably must check for arbitrary binary data here, too, like in the iOS app

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Ic6834f5f5b57035831778305ece9228d14bed930
pull/5520/head
Tor Lillqvist 2022-11-24 13:47:51 +02:00 committed by Tor Lillqvist
parent 459bba8dc2
commit a0fabb543c
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ static void send2JS(const std::vector<char>& buffer)
std::vector<char> data;
for (int i = 0; i < buffer.size(); i++)
{
if (ubufp[i] < ' ' || ubufp[i] == '\'' || ubufp[i] == '\\')
if (ubufp[i] < ' ' || ubufp[i] >= 0x80 || ubufp[i] == '\'' || ubufp[i] == '\\')
{
data.push_back('\\');
data.push_back('x');