SAM message quoting fix

This commit is contained in:
zzz committed 2015-06-03 12:33:42 +00:00
1 parent 362086994a
commit 9304cb2bbc
1 file changed
+2 -2
@@ -951,10 +951,10 @@ class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatagramRece
msg = msg.replace("\r", " ");
if (!msg.startsWith("\"")) {
msg = msg.replace("\"", "");
if (msg.contains("\"") || msg.contains("\t"))
if (msg.contains(" ") || msg.contains("\t"))
msg = '"' + msg + '"';
}
rv = " MESSAGE=\"" + msg + "\"";
rv = " MESSAGE=" + msg;
} else {
rv = "";
}