WordPress.org

Make WordPress Core

Changeset 24585


Ignore:
Timestamp:
07/08/2013 01:55:50 PM (8 years ago)
Author:
nacin
Message:

Use wp_basename() in newer media code for filenames to avoid encoding issues on display. props SergeyBiryukov, fixes #23267.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r24547 r24585  
    24242424    $post = get_post();
    24252425
    2426     $filename = esc_html( basename( $post->guid ) );
     2426    $filename = esc_html( wp_basename( $post->guid ) );
    24272427
    24282428    $media_dims = '';
  • trunk/wp-includes/media.php

    r24572 r24585  
    16071607        'id'          => $attachment->ID,
    16081608        'title'       => $attachment->post_title,
    1609         'filename'    => basename( $attachment->guid ),
     1609        'filename'    => wp_basename( $attachment->guid ),
    16101610        'url'         => $attachment_url,
    16111611        'link'        => get_attachment_link( $attachment->ID ),
Note: See TracChangeset for help on using the changeset viewer.