• When uploading a file that contains non-URI characters (such as spaces) the file is uploaded successfully, but the link displayed for the file is not properly URI-encoded:
    Instead of this:
    <img src="upload_dir/file with spaces.gif">
    it should be this:
    <img src="upload_dir/file%20with%20spaces.jpg">
    The PHP function rawurlencode() can be used to encode the filename.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If your webhost is using a Linux based machine, spaces are just going to be a nightmare in names. Please use “_” (underscores) to seperate words if you have to, don’t use spaces.
    Regards

    Thread Starter patmfitz

    (@patmfitz)

    I am setting up wordpress for a client and though I can recommend that he avoids spaces in filenames, he will continue using them.
    If you are going to allow filenames with spaces (and other characters that are not safe in a URI) to be uploaded, then you should display the correctly encoded link.
    -fitz

    Please file a bug report.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘BUG: upload filename with spaces bad link’ is closed to new replies.