From cf9f85dc8121a359d550ffa3b735fb48859eee88 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 24 Apr 2008 11:45:39 +0000 Subject: Merged with WP 2.5, revision 7806 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1260 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'wp-includes/functions.php') diff --git a/wp-includes/functions.php b/wp-includes/functions.php index 4399313..1a08fb8 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1149,7 +1149,8 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = NULL ) $ext = strtolower( ".$ext" ); $filename = str_replace( $ext, '', $filename ); - $filename = sanitize_title_with_dashes( $filename ) . $ext; + // Strip % so the server doesn't try to decode entities. + $filename = str_replace('%', '', sanitize_title_with_dashes( $filename ) ) . $ext; while ( file_exists( $dir . "/$filename" ) ) { if ( '' == "$number$ext" ) -- cgit