oseawey / timthumb

Automatically exported from code.google.com/p/timthumb
0 stars 0 forks source link

Images with spaces in them do not work #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
It appears that using TimThumb with an image that contains spaces in its 
filename breaks the script.

For example, given an image in the relative path:
photos/2011/1/1/image with spaces.jpg

The url for TimThumb to display a thumbnail of this image would be
timthumb.php?src=photos%2F2011%2F1%2F1%2Fimage%2Bwith%2Bspaces.jpg&w=169.375&h=2
00

The error message I get is:

file not found photos/2011/1/1/image+with+spaces.jpg
Query String : 
src=photos%2F2011%2F1%2F1%2Fimage%2Bwith%2Bspaces.jpg&w=169.375&h=200
TimThumb version : 1.19

Looks like the url-encoded %2B are getting converted back to +, not space.

Original issue reported on code.google.com by kir...@gmail.com on 8 Jan 2011 at 4:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Just remove this line of code:

(Line 672)

$src = str_replace (' ', '%20', $src);

Original comment by pms...@gmail.com on 8 Jan 2011 at 11:54

GoogleCodeExporter commented 9 years ago
this has been updated in the latest version. please verify :)

Original comment by BinaryMoon on 14 Feb 2011 at 10:41