[wp-trac] [WordPress Trac] #62995: Uploading Mac screenshots results in broken images, due to question marks inserted in filenames

WordPress Trac noreply at wordpress.org
Fri Feb 21 16:20:08 UTC 2025


#62995: Uploading Mac screenshots results in broken images, due to question marks
inserted in filenames
-------------------------------+------------------------------
 Reporter:  room34             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Media              |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  administration
-------------------------------+------------------------------

Comment (by room34):

 Interesting...

 Tested in Playground: Uploads successfully.

 Tested with clean WordPress install of a new site on the same server:
 Uploads successfully.

 Tested on original site with all plugins deactivated, Twenty Twenty-Five
 theme, and WP core reinstalled: Error still occurs.

 It looks like it has to do with the data tables. The original site where
 the error is happening is a very old installation. It's running 6.7.2, but
 it was originally created with WordPress 2.1 in 2007.

 I noticed the installations where this was successful did not replace the
 narrow no-break space character in the filename. I checked the database
 and the core WP tables have "latin1_swedish_ci" collation, so they're not
 UTF-8. That would explain the question marks.

 Anyway… I do think this still points to an issue that should be addressed.
 Since WordPress is already modifying Media Library filenames to be
 maximally compatible for URLs, I would think ideally it would strip out
 UTF-8 characters, at least non-essential ones like the narrow no-break
 space.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62995#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list