Webscript scripturl() method encoding now supported in PageRenderer website framework

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6897 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-10-02 12:56:10 +00:00
parent c6a4457025
commit f78733d78f
2 changed files with 79 additions and 31 deletions

View File

@@ -83,7 +83,17 @@ public final class ScriptUrlMethod implements TemplateMethodModelEx
StringBuffer buf = new StringBuffer(128);
buf.append(prefixServiceUrl ? req.getServicePath() : "");
buf.append(arg);
buf.append(arg.length() != 0 ? "&" : "");
if (arg.length() != 0)
{
if (arg.indexOf('?') == -1)
{
buf.append('?');
}
else
{
buf.append('&');
}
}
buf.append("guest=" + (req.isGuest() ? "true" : ""));
if (req.getFormatStyle() == FormatStyle.argument)
{