Commit 925026d4 authored by Ard Schrijvers's avatar Ard Schrijvers

HSTTWO-4166 Make sure the query string does not have ? twice

When there is a rendering host querystring in the channel mngr, the
query string could have twice the ?
parent 3e4d9586
......@@ -292,7 +292,14 @@ public class HstLinkTag extends ParamContainerTag {
}
} else if (!parametersMap.isEmpty()) {
String queryString = getQueryString(reqContext.getBaseURL().getURIEncoding(), parametersMap, removedParametersList);
urlString += queryString;
if (StringUtils.isNotBlank(queryString)) {
if (urlString.contains("?")) {
// remove the "?" from the query string
urlString += "&" + queryString.substring(1);
} else {
urlString += queryString;
}
}
}
} catch (UnsupportedEncodingException e) {
throw new JspException("UnsupportedEncodingException on the base url", e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment