Problems with parentheses in file names

2 views
Skip to first unread message

illov

unread,
Nov 7, 2008, 4:26:11 AM11/7/08
to Slimbox
Hello,
had some problems with parantheses in filenames, e.g. "test
(test2).jpg". Slimbox didn't display such images.

Changed the code in slimbox.js 1.64 as follows:

image.setStyles({backgroundImage: "url(" + images[activeImage][0] +
")", display: ""});

replaced by:

image.setStyles({backgroundImage: "url('" + images[activeImage][0] +
"')", display: ""});

means: single quotes around the url added.

Solved.

Bye!

Chris

unread,
Nov 17, 2008, 10:48:56 AM11/17/08
to Slimbox
Parenthesis are invalid characters for URLs. You must use their URL-
encoded equivalent instead

Just replace ( with %28 and ) with %29.

The PHP function urlencode() does this automatically.
Reply all
Reply to author
Forward
0 new messages