roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r574623 - /roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
Date Tue, 11 Sep 2007 15:12:11 GMT
Author: snoopdave
Date: Tue Sep 11 08:12:11 2007
New Revision: 574623

URL: http://svn.apache.org/viewvc?rev=574623&view=rev
Log:
Fix for http://opensource.atlassian.com/projects/roller/browse/ROL-1542
"resource path in i18n directory or filename"

Tested with Chinese chars in directory name and in file name.

Modified:
    roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java

Modified: roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
URL: http://svn.apache.org/viewvc/roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java?rev=574623&r1=574622&r2=574623&view=diff
==============================================================================
--- roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
(original)
+++ roller/trunk/apps/weblogger/src/java/org/apache/roller/weblogger/business/MultiWeblogURLStrategy.java
Tue Sep 11 08:12:11 2007
@@ -147,7 +147,7 @@
         }
         
         if(cat != null && dateString == null) {
-            pathinfo.append("category/").append(URLUtilities.encode(cat));
+            pathinfo.append("category/").append(URLUtilities.encodePath(cat));
             
         } else if(dateString != null && cat == null) {
             pathinfo.append("date/").append(dateString);  
@@ -307,9 +307,9 @@
         url.append("resource/");
         
         if(filePath.startsWith("/")) {
-            url.append(filePath.substring(1));
+            url.append(URLUtilities.encodePath(filePath.substring(1)));
         } else {
-            url.append(filePath);
+            url.append(URLUtilities.encodePath(filePath));
         }
         
         return url.toString();



Mime
View raw message