}
public static String urlEncode(String string) {
+ if (string.startsWith("./"))
+ string = string.substring(2);
+
try {
- return URLEncoder.encode(string, UTF_8);
+ return URLEncoder.encode(string, UTF_8).replace("+", "%20");
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
}
-
}