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:
parent
c8c4a683c1
commit
d76c931269
|
@ -3249,7 +3249,7 @@ function sanitize_text_field($str) {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function wp_basename( $path, $suffix = '' ) {
|
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 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue