match = match.replaceAll("\\\\x2D", "-").replaceAll("\\\\x26", "&");
}
WSRPPortletURL portletURL = WSRPPortletURL.create(match, supportedCustomModes, supportedCustomWindowStates, true);
URLFormat urlFormat;
// If the current url is using & then specify we want to use xml escaped ampersands
if (match.contains("&"))
{
urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), true);
}
else
{
urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), false);
}
String value = context.renderURL(portletURL, urlFormat);
// we now need to add back the javascript url encoding if it was originally used