forked from I2P_Developers/i2p.i2p
remove unneeded escape char in other parsers
This commit is contained in:
@ -180,10 +180,10 @@ class SAMUtils {
|
|||||||
* PING any thing goes
|
* PING any thing goes
|
||||||
* PONG any thing goes
|
* PONG any thing goes
|
||||||
*
|
*
|
||||||
* No escaping of '"' or anything else is allowed or defined
|
* Escaping is allowed with a backslash, e.g. \"
|
||||||
* No spaces before or after '=' allowed
|
* No spaces before or after '=' allowed
|
||||||
* Keys may not be quoted
|
* Keys may not be quoted
|
||||||
* COMMAND and OPCODE may not have '='
|
* COMMAND, OPCODE, and keys may not have '=' or whitespace unless escaped
|
||||||
* Duplicate keys not allowed
|
* Duplicate keys not allowed
|
||||||
*</pre>
|
*</pre>
|
||||||
*
|
*
|
||||||
@ -274,6 +274,12 @@ class SAMUtils {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '\\':
|
||||||
|
if (++i >= length)
|
||||||
|
throw new SAMException("Unterminated escape");
|
||||||
|
c = args.charAt(i);
|
||||||
|
// fall through...
|
||||||
|
|
||||||
default:
|
default:
|
||||||
buf.append(c);
|
buf.append(c);
|
||||||
break;
|
break;
|
||||||
|
@ -1520,7 +1520,7 @@ public class EepGet {
|
|||||||
String key = null;
|
String key = null;
|
||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
switch (data[i]) {
|
switch (data[i]) {
|
||||||
case '\"':
|
case '"':
|
||||||
if (isQuoted) {
|
if (isQuoted) {
|
||||||
// keys never quoted
|
// keys never quoted
|
||||||
if (key != null) {
|
if (key != null) {
|
||||||
|
@ -123,7 +123,7 @@ public class LoadClientAppsJob extends JobImpl {
|
|||||||
for (int i = 0; i < data.length; i++) {
|
for (int i = 0; i < data.length; i++) {
|
||||||
switch (data[i]) {
|
switch (data[i]) {
|
||||||
case '\'':
|
case '\'':
|
||||||
case '\"':
|
case '"':
|
||||||
if (isQuoted) {
|
if (isQuoted) {
|
||||||
String str = buf.toString().trim();
|
String str = buf.toString().trim();
|
||||||
if (str.length() > 0)
|
if (str.length() > 0)
|
||||||
|
Reference in New Issue
Block a user