forked from I2P_Developers/i2p.i2p
i2psnark: Another escaping fix
This commit is contained in:
@ -87,6 +87,7 @@ class URIUtil
|
|||||||
case ':':
|
case ':':
|
||||||
case '[':
|
case '[':
|
||||||
case ']':
|
case ']':
|
||||||
|
case '&':
|
||||||
buf=new StringBuilder(path.length()*2);
|
buf=new StringBuilder(path.length()*2);
|
||||||
break loop;
|
break loop;
|
||||||
default:
|
default:
|
||||||
@ -151,6 +152,10 @@ class URIUtil
|
|||||||
case ']':
|
case ']':
|
||||||
buf.append("%5D");
|
buf.append("%5D");
|
||||||
continue;
|
continue;
|
||||||
|
// not strictly required but this is probably HTML output
|
||||||
|
case '&':
|
||||||
|
buf.append("%26");
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
if (c <= 0x1f) // includes negative
|
if (c <= 0x1f) // includes negative
|
||||||
toHex(c,buf);
|
toHex(c,buf);
|
||||||
@ -204,6 +209,9 @@ class URIUtil
|
|||||||
case ']':
|
case ']':
|
||||||
buf.append("%5D");
|
buf.append("%5D");
|
||||||
continue;
|
continue;
|
||||||
|
case '&':
|
||||||
|
buf.append("%26");
|
||||||
|
continue;
|
||||||
default:
|
default:
|
||||||
if (c <= 0x1f || (c >= 0x7f && c <= 0x9f) || Character.isSpaceChar(c))
|
if (c <= 0x1f || (c >= 0x7f && c <= 0x9f) || Character.isSpaceChar(c))
|
||||||
toHex(c,buf);
|
toHex(c,buf);
|
||||||
|
Reference in New Issue
Block a user