diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 1bfb12d69b..122362a527 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -20,7 +20,7 @@ if ( !current_user_can('edit_plugins') ) $title = __("Edit Plugins"); $parent_file = 'plugins.php'; -wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin')); +wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) ); $plugins = get_plugins(); @@ -39,8 +39,6 @@ $plugin_files = get_plugin_files($plugin); if ( empty($file) ) $file = $plugin_files[0]; -else - $file = wp_unslash($file); $file = validate_file_to_edit($file, $plugin_files); $real_file = WP_PLUGIN_DIR . '/' . $file; diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index c8298d0c3b..2033a23845 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -68,7 +68,7 @@ if ( empty( $file ) ) { $relative_file = 'style.css'; $file = $allowed_files['style.css']; } else { - $relative_file = wp_unslash( $file ); + $relative_file = $file; $file = $theme->get_stylesheet_directory() . '/' . $relative_file; }