Bilgin, I have just committed a very similar fix. Thanks for the bug report and fix.
Jacopo Bilgin wrote:
This change fixes the problem. Should i create jira for it ? Index: framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java =================================================================== --- framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java (revision 561754) +++ framework/webapp/src/org/ofbiz/webapp/ftl/OfbizContentTransform.java (working copy) @@ -56,8 +56,10 @@ // make the link StringBuffer newURL = new StringBuffer(); ContentUrlTag.appendContentPrefix(request, newURL); - if (newURL.charAt(newURL.length() - 1) != '/' && buf.charAt(0) != '/') { - newURL.append('/'); + if (newURL.length() > 0 ) { + if (newURL.charAt(newURL.length() - 1) != '/' && buf.charAt(0) != '/') { + newURL.append('/'); + } }newURL.append(buf.toString()); out.write(newURL.toString());
