From 107733e2630ab3b020bb06f6f70ff88d89767a68 Mon Sep 17 00:00:00 2001 From: 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: http://svn.automattic.com/wordpress/trunk@20314 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 0258e3af3..d464f541c 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; }