Title: Doesn&#039;t Handle URL-encoding
Last modified: August 20, 2016

---

# Doesn't Handle URL-encoding

 *  [UltraNurd](https://wordpress.org/support/users/ultranurd/)
 * (@ultranurd)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/doesnt-handle-url-encoding/)
 * When caching files that have a URL-encoded character in their path, such as %
   20 for space, the literal filename on disk remains URL-encoded, so when the post
   gets updated, the img src is wrong.
 * For example, if an image links to “Foo%20bar.jpg”, the file is downloaded as “
   Foo%20bar.jpg” instead of “Foo bar.jpg”. I was able to quickly script something
   to move the files that had been named incorrectly, but definitely still a bug
   with the plugin.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Bilbotorm](https://wordpress.org/support/users/bilbotorm/)
 * (@bilbotorm)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/doesnt-handle-url-encoding/#post-2267523)
 * Hi
 * I am facing the same issue. Trying to import all images on my former blog on 
   blogspot/blogger, and strange image names : +, space, %, makes the script buggy.
   
   It does not import all images; and it gets stuck at one point, not filling the
   img src/al links properly :'(
 * if someone manages to patch this or get a trick to import all blogger images 
   properly, i would welcome any advices
 * Cheers
 *  [jim747](https://wordpress.org/support/users/jim747/)
 * (@jim747)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/doesnt-handle-url-encoding/#post-2267625)
 * Hi
 * I am having the same issue with % character. Did you solve the issue/ reworked
   the script? May I ask you to send it/ post it?
 * Regards
    Jim
 *  [Kevin Hagerty](https://wordpress.org/support/users/khag7/)
 * (@khag7)
 * [14 years, 4 months ago](https://wordpress.org/support/topic/doesnt-handle-url-encoding/#post-2267630)
 * Same issue here. Should be an easy fix. But the problems it causes are huge. 
   I now have about 50 images which are broken and no easy way to rename them. I
   have to find the original image, replace it in the media library, then go through
   all the posts that use that image and update them to use the new source. Then
   repeat times 50. All cause of one small part of the code. Bummer 🙁
 *  [Kevin Hagerty](https://wordpress.org/support/users/khag7/)
 * (@khag7)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/doesnt-handle-url-encoding/#post-2267631)
 * The real problem is not in the plugin but in wordpress itself. The details are
   outlined here: [WordPress bug ticket 16330
 * The fix proposed at [comment 16](http://core.trac.wordpress.org/ticket/16330#comment:16)
   by [kawauso](http://profiles.wordpress.org/users/kawauso) involves a small change
   to 1 line of code in each of 2 files, and removing 3 lines of code in a 3rd file.
   [Here is the .diff file](http://core.trac.wordpress.org/attachment/ticket/16330/16330.2.diff)
   with the proposed code changes.
 * Note that it is not recommended to edit these files, but if you know what you
   are doing you can fix the problem of + and % in filenames by editing the lines
   as shown.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Doesn't Handle URL-encoding’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cache-images.svg)
 * [Cache Images](https://wordpress.org/plugins/cache-images/)
 * [Support Threads](https://wordpress.org/support/plugin/cache-images/)
 * [Active Topics](https://wordpress.org/support/plugin/cache-images/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cache-images/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cache-images/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Kevin Hagerty](https://wordpress.org/support/users/khag7/)
 * Last activity: [14 years, 3 months ago](https://wordpress.org/support/topic/doesnt-handle-url-encoding/#post-2267631)
 * Status: not resolved