Closed (fixed)
Project:
Thickbox
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Feb 2007 at 19:51 UTC
Updated:
29 Nov 2007 at 01:02 UTC
I've run into a bug using Thickbox; and it deals with Thickbox not loading an image that has a filename with a special character in it, specifically an ' (apostrophe). Once the module reads in the filename it's truncating it when it see an apostrophe and not escaping it out.
The image.module seems to handle filenames with special characters like apostrophes just fine. I know it's not ideal to have spaces and special character in filenames, but users seem to come up with these sorts of things, it would be nice if the module can project against this sort of failure.
Comments
Comment #1
slayerment commentedI'm having this same issue (spaces in filenames). Is there any type of way to fix this?
Thanks!
Comment #2
eferraiuolo commentedIn the latest version of Thinbox, submitted on 04/06/2007 I don't have a problem with spaces in the filenames of image, but still there's an issue with ' (apostrophe). I was just needed this fixed to hedge against the risk that users would name their files with these sorts of special characters, as my test data for a project had filenames like this.
Comment #3
konsumer commentedI fixed this by editting thickbox.js
I replaced the " ' " with \" in the code, and added a replace for ' " ' in the url string.
on line 113:
is changed to:
A possibly "better" solution would be URL encoding before it gets to this point, so that all listings will work, without having to account for this contingency.
so
this is a "image" -'test'.jpg
would translate to
this%20is%20a%20%22image%22%20-%20%27test%27.jpg
I'm not quite sure where to put the translation code, though,
Comment #4
sunThis is a Drupal core issue. You definitely should test Transliterate filenames module. Please report back if that module works for you (and mark this issue fixed if it does).
Comment #5
konsumer commentedworks great. Much better solution.