fixed escaping with quote or dquote (fixes #256)

This commit is contained in:
john30
2019-01-27 10:00:02 +01:00
parent fa434e5151
commit 753cde6773
+3 -3
View File
@@ -476,11 +476,11 @@ result_t MainLoop::decodeMessage(const string &data, bool isHttp, bool* connecte
} else if (token.length() == 0) { // allow multiple space chars for a single delimiter
continue;
} else if (token[0] == '"' || token[0] == '\'') {
escaped = token[0];
token.erase(0, 1);
if (token.length() > 0 && token[token.length()-1] == token[0]) {
if (token.length() > 0 && token[token.length()-1] == escaped) {
token.erase(token.length() - 1, 1);
} else {
escaped = token[0];
escaped = 0;
}
}
}