Make WordPress Core


Ignore:
Timestamp:
03/01/2014 09:44:43 PM (12 years ago)
Author:
nacin
Message:

Strip backslashes, not just forward slashes, from untrailingslashit().

trailingslashit() will now remove any forward or backslashes from the end of a string before appending a forward slash.

props knutsp, willmot.
fixes #22267.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r27272 r27344  
    14561456
    14571457        if ( $temp )
    1458                 return trailingslashit( rtrim( $temp, '\\' ) );
     1458                return trailingslashit( $temp );
    14591459
    14601460        if ( function_exists('sys_get_temp_dir') ) {
    14611461                $temp = sys_get_temp_dir();
    14621462                if ( @is_dir( $temp ) && wp_is_writable( $temp ) )
    1463                         return trailingslashit( rtrim( $temp, '\\' ) );
     1463                        return trailingslashit( $temp );
    14641464        }
    14651465
    14661466        $temp = ini_get('upload_tmp_dir');
    14671467        if ( @is_dir( $temp ) && wp_is_writable( $temp ) )
    1468                 return trailingslashit( rtrim( $temp, '\\' ) );
     1468                return trailingslashit( $temp );
    14691469
    14701470        $temp = WP_CONTENT_DIR . '/';
Note: See TracChangeset for help on using the changeset viewer.