WordPress.org

Make WordPress Core

Changeset 22310


Ignore:
Timestamp:
10/25/2012 10:31:17 PM (6 years ago)
Author:
ryan
Message:

Fix wp_basename() for Windows by replacing %5C with /.

Props SergeyBiryukov
fixes #22138

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/formatting.php

    r22255 r22310  
    32503250 */
    32513251function wp_basename( $path, $suffix = '' ) {
    3252     return urldecode( basename( str_replace( '%2F', '/', urlencode( $path ) ), $suffix ) );
     3252    return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
    32533253}
    32543254
Note: See TracChangeset for help on using the changeset viewer.