i2psnark: Another escaping fix

This commit is contained in:
zzz
2019-11-08 14:48:30 +00:00
parent 2738b3d29c
commit dfc533b6e8

View File

@ -87,6 +87,7 @@ class URIUtil
case ':':
case '[':
case ']':
case '&':
buf=new StringBuilder(path.length()*2);
break loop;
default:
@ -151,6 +152,10 @@ class URIUtil
case ']':
buf.append("%5D");
continue;
// not strictly required but this is probably HTML output
case '&':
buf.append("%26");
continue;
default:
if (c <= 0x1f) // includes negative
toHex(c,buf);
@ -204,6 +209,9 @@ class URIUtil
case ']':
buf.append("%5D");
continue;
case '&':
buf.append("%26");
continue;
default:
if (c <= 0x1f || (c >= 0x7f && c <= 0x9f) || Character.isSpaceChar(c))
toHex(c,buf);