From c654d0ccf0da187e8d4728145569ad2cafae70e5 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Thu, 29 Mar 2012 03:34:51 +0000 Subject: [PATCH] urldecode() the incoming $file in the theme editor. see [20313] when the encode was added. see #2994 for the original bug report. see #20103. git-svn-id: https://develop.svn.wordpress.org/trunk@20314 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/theme-editor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 0258e3af35..d464f541cd 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -45,7 +45,7 @@ get_current_screen()->set_help_sidebar( wp_reset_vars( array( 'action', 'error', 'file', 'theme' ) ); if ( $theme ) - $stylesheet = $theme; + $stylesheet = urldecode( $theme ); else $stylesheet = get_stylesheet(); @@ -73,7 +73,7 @@ if ( empty( $file ) ) { $file = current( $allowed_files ); } } else { - $relative_file = stripslashes( $file ); + $relative_file = urldecode( stripslashes( $file ) ); $file = $theme->get_stylesheet_directory() . '/' . $relative_file; }