CSS with urls having / are ignored

4 messages - 1264 views

Any url with aboslute path is failing..

desktop {
    bg-color: #003d3d;
    bg-image: url( /mainbg.jpg );
    color: white;
}

this would get converted to /img/mainbg.jpg

On further source code view (Kuix.java).. I see the line where it says all / chars are ignored..

if (c == '/')
   { // Caution that all '/' character are ignored
       if ((c = reader.read()) == '*')
       {
    commentCapture = true;
    c = reader.read();
    continue;
       }
   }

Any inputs on why this is being ignored..

Regards,

Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

Temporarily, you can double the /. Like :

desktop {
    bg-color: #003d3d;
    bg-image: url( //mainbg.jpg );
    color: white;
}

Thank you for this.. it works.

Also, my developer has fixed this at code level like this.. pl. see if this coudl get into your fix..in case this has no side effects

in     private static void parseCss(InputStream inputStream) of class Kuix

if (c == '/')
   { // Caution that all '/' character are ignored
       if ((c = reader.read()) == '*')
       {
    commentCapture = true;
    c = reader.read();
    continue;
       }
       rawDefinitions.append('/'); //this is added..
   }

Thanks, but it could be better  like this :

                        if (c == '/') {
                            if ((c = reader.read()) == '*') {
                                commentCapture = true;
                                c = reader.read();
                                continue;
                            } else {
                                if (selectorsCapture) {
                                    rawSelectors.append('/');
                                } else {
                                    rawDefinitions.append('/');
                                }
                            }
                        }