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

Props SergeyBiryukov
fixes #22138


git-svn-id: http://core.svn.wordpress.org/trunk@22310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-10-25 22:31:17 +00:00
parent 391ff2f639
commit 21d6dbc4a8
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 ) );
}
/**