HDS02 / timthumb

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

+ Character in image not working after import #384

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Expecting thumbnail, seeing nothing

What version of the product are you using? On what operating system?
Latest download, Linux

Please provide any additional information below.

I recently imported over 2000 posts into wordpress, the theme I'm using is 
using timthumb. Here is the issue, half of the images in my import have a + 
character in the image. imagename+imagename.jpg etc..

Now the replacing %2B in the images doesn't work since the post itself in the 
wordpress theme has the + character. So basically if I encode the image itself 
with %2B the thumbnail will now work but not the image linked to the post. If I 
leave the image as is the main image in the post works but not the thumbnail. 
Now in the older version of TimThumb I was able to add this code to correct the 
issue withou having to modify all the posts:

$find=array("+"," ");
$replace=array("%2B","+");
$src =str_replace($find,$replace,$src );

It solved the issue but it was the vulnerable script plus it couldn't get 
external images. Any fixes for this current issue in the script without having 
to change the characters in over 1000 posts in my blog.

Original issue reported on code.google.com by jobseek...@gmail.com on 10 Jun 2012 at 2:19

GoogleCodeExporter commented 8 years ago

Original comment by BinaryMoon on 27 Sep 2013 at 9:40