diff --git a/guacamole/proxy/protocol.c b/guacamole/proxy/protocol.c index 6afae1968..b6455c2a9 100644 --- a/guacamole/proxy/protocol.c +++ b/guacamole/proxy/protocol.c @@ -19,10 +19,8 @@ char* guac_escape_string(const char* str) { switch (str[i]) { case ';': - length += 2; - break; - case ',': + case '\\': length += 2; break; @@ -49,6 +47,11 @@ char* guac_escape_string(const char* str) { *(current++) = 'c'; break; + case '\\': + *(current++) = '\\'; + *(current++) = '\\'; + break; + default: *(current++) = str[i]; }