[Yanel-commits] rev 37259 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/util

michi at wyona.com michi at wyona.com
Fri Jun 27 10:23:41 CEST 2008


Author: michi
Date: 2008-06-27 10:23:41 +0200 (Fri, 27 Jun 2008)
New Revision: 37259

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java
Log:
also replace colon

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java	2008-06-27 08:19:19 UTC (rev 37258)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/util/PathUtil.java	2008-06-27 08:23:41 UTC (rev 37259)
@@ -100,10 +100,10 @@
 
     /**
      * @param resource Resource
-     * @return A string with as many ../ as it needs to get from the resource path to the root of the realm and adds the reservedPrefix and resource-types/resource-type-namespace%3a%3aresource-type-localname/ to it. wheras the resource-type-universalname is urlencoded.
+     * @return A string with as many ../ as it needs to get from the resource path to the root of the realm and adds the reservedPrefix and resource-types/resource-type-namespace%3a%3aresource-type-localname/ to it, whereas the resource-type-universalname is url-encoded.
      */
     public static String getResourcesHtdocsPathURLencoded(Resource resource) {
-        return getGlobalHtdocsPath(resource) + "resource-types/" + resource.getResourceTypeNamespace().replaceAll("/", "%2f") + "%3a%3a" + resource.getResourceTypeLocalName() + "/";
+        return getGlobalHtdocsPath(resource) + "resource-types/" + resource.getResourceTypeNamespace().replaceAll("/", "%2f").replaceAll(":", "%3a") + "%3a%3a" + resource.getResourceTypeLocalName() + "/";
     }
     
     /**



More information about the Yanel-commits mailing list