From 4063955ca29367290922c49234f88cb7591a849f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 21 Mar 2011 16:34:13 +0100 Subject: [PATCH] =?utf8?q?Encode=20ampersand=20(=E2=80=9C&=E2=80=9D)=20and?= =?utf8?q?=20equals=20signs=20(=E2=80=9C=3D=E2=80=9D)=20in=20URL.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java index a6a87df..a04873d 100644 --- a/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java +++ b/src/main/java/net/pterodactylus/sone/web/SoneTemplatePage.java @@ -213,12 +213,12 @@ public class SoneTemplatePage extends TemplatePage { StringBuilder requestParameters = new StringBuilder(); for (String parameterName : httpRequest.getParameterNames()) { if (requestParameters.length() > 0) { - requestParameters.append('&'); + requestParameters.append("%26"); } String[] parameterValues = httpRequest.getMultipleParam(parameterName); for (String parameterValue : parameterValues) { try { - requestParameters.append(URLEncoder.encode(parameterName, "UTF-8")).append('=').append(URLEncoder.encode(parameterValue, "UTF-8")); + requestParameters.append(URLEncoder.encode(parameterName, "UTF-8")).append("%3d").append(URLEncoder.encode(parameterValue, "UTF-8")); } catch (UnsupportedEncodingException uee1) { /* A JVM without UTF-8? I don’t think so. */ } -- 2.7.4