V4.2.x Image uploader in admin doesn't allow some punctuation

Discussion in 'v4.2.X Bug Tracker' started by awbrys, Aug 10, 2012.

Thread Status:
Not open for further replies.
  1. awbrys New Member

    The image upload facility doesn’t work in the admin section if the image file name contains an appostrophe (and likely other special characters too such as #“* etc). I haven't tested whether the front-end image uploader has the same problem or not.

    Unfortunately I have a large number images that all contain apostrophes and it will be a very lengthy task to change them all prior to uploading.

    I've raised a support ticket for this about a week ago but I'm unsure how soon it will get addressed. Is anyone able to help me?
  2. awbrys New Member

    Ok, I think I may have fixed all by myself. Just after this in includes/classses/images/class_upload.php

    $fileName = preg_replace("/[^a-z0-9.-_]/", "", strtolower($fileName));

    ... Add this:

    $fileName = str_replace ("\\", "", $fileName);

    Hope this helps some people, as well as 68 Classifieds staff.
  3. Mike-N-Tosh Owner

    This is not a bug and will not be fixed. For compatibility purposes filenames include only alphanumeric (a-z and 0-9) characters, hyphen, underscore and the period for extension only.
Thread Status:
Not open for further replies.

Share This Page