This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]
TitleFirefox does not like escaped / char in URL
Date26-Jan-2005 05:08:13 EET
Version2.1.86 alpha
Submitter202.27.54.3
Bug criticalityMediumBug
Browser versionFirefox
Bug statusNewBug
PageProvider used
Servlet ContainerTomcat 4.1.30
Operating SystemSolaris
URL
Java version1.4.2_05

When an image is inlined by JSPWiki it escapes the URL including the / char. This works in IE but causes Firefox to obtain a file from some cache somewhere, the file equates to the first version of any attached image.

In my case this is bad news since users are developing code based on the diagrams and firefox users will see old versions !!

The following change to com.ecyrd.jspwiki.TextUtil fixed the problem

   /**
     *  java.net.URLEncoder.encode() method in JDK < 1.4 is buggy.  This duplicates
     *  its functionality.
     */
    protected static String urlEncode( byte[] rs )
    {
        StringBuffer result = new StringBuffer();

        // Does the URLEncoding.  We could use the java.net one, but
        // it does not eat byte[]s.

        for( int i = 0; i < rs.length; i++ )
        {
            char c = (char) rs[i];

            switch( c )
            {
              case '_':
              case '.':
              case '*':
              case '-':
                result.append( c );
                break;
                //we dont want / escaped, it breaks urls in firefox
              case '/':
                  result.append( c );
                  break;

              case ' ':
                result.append( '+' );
                break;

etc

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 26-Jan-2005 05:08 by 202.27.54.3.