You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by "Jian Liu (JIRA)" <no...@atlassian.com> on 2007/08/21 18:22:54 UTC

[Roller-JIRA] Created: (ROL-1542) resource path in i18n directory or filename

resource path in i18n directory or filename
-------------------------------------------

                 Key: ROL-1542
                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1542
             Project: Roller
          Issue Type: Bug
         Environment: trunk
            Reporter: Jian Liu
            Assignee: Roller Unassigned


if create a i18n name directory in a blog's resource space, then the resource path in resource url should be encoded.

add below method in URLUtilities.java

    /**
     * URL encode a path string using UTF-8. The path seprator '/' will not be encoded
     */
    public static final String encodePath(String path) {
        int i = path.indexOf('/');
        StringBuffer sb = new StringBuffer();
		while(i!=-1) {
			sb.append(encode(path.substring(0,i))).append('/');
			path = path.substring(i+1);
			i = path.indexOf('/');
		}
		sb.append(path);
        return sb.toString();
    }

then modified the getWeblogResourceURL method in MultiWeblogURLStrategy;


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[Roller-JIRA] Updated: (ROL-1542) resource path in i18n directory or filename

Posted by "David Johnson (JIRA)" <no...@atlassian.com>.
     [ http://opensource.atlassian.com/projects/roller/browse/ROL-1542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Johnson updated ROL-1542:
-------------------------------

         Assignee: David Johnson  (was: Roller Unassigned)
    Fix Version/s: 4.0

I'll take a look at this for 4.0

> resource path in i18n directory or filename
> -------------------------------------------
>
>                 Key: ROL-1542
>                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1542
>             Project: Roller
>          Issue Type: Bug
>         Environment: trunk
>            Reporter: Jian Liu
>            Assignee: David Johnson
>             Fix For: 4.0
>
>         Attachments: MultiWeblogURLStrategy_java.patch
>
>
> if create a i18n name directory in a blog's resource space, then the resource path in resource url should be encoded.
> add below method in URLUtilities.java
>     /**
>      * URL encode a path string using UTF-8. The path seprator '/' will not be encoded
>      */
>     public static final String encodePath(String path) {
>         int i = path.indexOf('/');
>         StringBuffer sb = new StringBuffer();
> 		while(i!=-1) {
> 			sb.append(encode(path.substring(0,i))).append('/');
> 			path = path.substring(i+1);
> 			i = path.indexOf('/');
> 		}
> 		sb.append(path);
>         return sb.toString();
>     }
> then modified the getWeblogResourceURL method in MultiWeblogURLStrategy;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[Roller-JIRA] Updated: (ROL-1542) resource path in i18n directory or filename

Posted by "Jian Liu (JIRA)" <no...@atlassian.com>.
     [ http://opensource.atlassian.com/projects/roller/browse/ROL-1542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jian Liu updated ROL-1542:
--------------------------

    Attachment: MultiWeblogURLStrategy_java.patch

> resource path in i18n directory or filename
> -------------------------------------------
>
>                 Key: ROL-1542
>                 URL: http://opensource.atlassian.com/projects/roller/browse/ROL-1542
>             Project: Roller
>          Issue Type: Bug
>         Environment: trunk
>            Reporter: Jian Liu
>            Assignee: Roller Unassigned
>         Attachments: MultiWeblogURLStrategy_java.patch
>
>
> if create a i18n name directory in a blog's resource space, then the resource path in resource url should be encoded.
> add below method in URLUtilities.java
>     /**
>      * URL encode a path string using UTF-8. The path seprator '/' will not be encoded
>      */
>     public static final String encodePath(String path) {
>         int i = path.indexOf('/');
>         StringBuffer sb = new StringBuffer();
> 		while(i!=-1) {
> 			sb.append(encode(path.substring(0,i))).append('/');
> 			path = path.substring(i+1);
> 			i = path.indexOf('/');
> 		}
> 		sb.append(path);
>         return sb.toString();
>     }
> then modified the getWeblogResourceURL method in MultiWeblogURLStrategy;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/roller/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira