SAM message quoting fix

This commit is contained in:
zzz
2015-06-03 12:33:42 +00:00
parent 362086994a
commit 9304cb2bbc

View File

@@ -951,10 +951,10 @@ class SAMv1Handler extends SAMHandler implements SAMRawReceiver, SAMDatagramRece
msg = msg.replace("\r", " "); msg = msg.replace("\r", " ");
if (!msg.startsWith("\"")) { if (!msg.startsWith("\"")) {
msg = msg.replace("\"", ""); msg = msg.replace("\"", "");
if (msg.contains("\"") || msg.contains("\t")) if (msg.contains(" ") || msg.contains("\t"))
msg = '"' + msg + '"'; msg = '"' + msg + '"';
} }
rv = " MESSAGE=\"" + msg + "\""; rv = " MESSAGE=" + msg;
} else { } else {
rv = ""; rv = "";
} }