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

Props SergeyBiryukov
fixes #22138


git-svn-id: https://develop.svn.wordpress.org/trunk@22310 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2012-10-25 22:31:17 +00:00
parent c8c4a683c1
commit d76c931269
1 changed files with 1 additions and 1 deletions

View File

@ -3249,7 +3249,7 @@ function sanitize_text_field($str) {
* @return string
*/
function wp_basename( $path, $suffix = '' ) {
return urldecode( basename( str_replace( '%2F', '/', urlencode( $path ) ), $suffix ) );
return urldecode( basename( str_replace( array( '%2F', '%5C' ), '/', urlencode( $path ) ), $suffix ) );
}
/**