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:
parent
391ff2f639
commit
21d6dbc4a8
|
@ -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 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue