[wp-trac] [WordPress Trac] #16226: Attachment URL filenames are not urlencoded

WordPress Trac noreply at wordpress.org
Sun May 31 05:17:41 UTC 2015


#16226: Attachment URL filenames are not urlencoded
------------------------------------+------------------------------
 Reporter:  mdawaffe                |       Owner:
     Type:  defect (bug)            |      Status:  reopened
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Upload                  |     Version:  3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+------------------------------

Comment (by jblifestyles):

 If someone is looking to address this issue temporarily while waiting on
 the patch to get integrated, and happen to sit on a server, like Flywheel,
 that doesn't let you edit wp-includes....  You can simply add this to your
 theme's functions.php file


 {{{
 add_filter ('sanitize_file_name', 'remove_percents_filter', 10 );
 function remove_percents_filter( $filename ) {
     $filename = str_replace( '%', '', $filename );
     return $filename;
 }
 }}}

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


More information about the wp-trac mailing list