From c226ded799ff2b9a181d38ac0d88ac88365c35b1 Mon Sep 17 00:00:00 2001 From: luccioman Date: Tue, 30 May 2017 12:32:14 +0200 Subject: [PATCH] Fix unescape of URLs having some '%' chars but not percent-encoded --- .../net/yacy/cora/document/id/MultiProtocolURL.java | 11 ++++++++++- .../yacy/cora/document/id/MultiProtocolURLTest.java | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/source/net/yacy/cora/document/id/MultiProtocolURL.java b/source/net/yacy/cora/document/id/MultiProtocolURL.java index 7a42826a2..2b155b6ce 100644 --- a/source/net/yacy/cora/document/id/MultiProtocolURL.java +++ b/source/net/yacy/cora/document/id/MultiProtocolURL.java @@ -688,7 +688,7 @@ public class MultiProtocolURL implements Serializable, Comparableapplication/x-www-form-urlencoded string using UTF-8 encoding. * * @param s the string to decode - * @return the newly decoded string + * @return the newly decoded string, or the original string when it doesn't match the application/x-www-form-urlencoded format */ public static String unescape(final String s) { try { @@ -697,6 +697,15 @@ public class MultiProtocolURL implements Serializable, Comparable