From 90004a8ae6345d6740fc556c113fa024d992eb4a Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 17 Nov 2005 23:01:28 +0000 Subject: [PATCH] Don't stripslashes() in plugin_basename() since this breaks established expectation of being able to pass a non-escaped FILE. Instead, stripslashes further up the stack. fixes #1866 git-svn-id: http://svn.automattic.com/wordpress/trunk@3139 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin.php | 1 + wp-includes/functions.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/admin.php b/wp-admin/admin.php index e6a4b2336c..010e4b347f 100644 --- a/wp-admin/admin.php +++ b/wp-admin/admin.php @@ -41,6 +41,7 @@ require(ABSPATH . '/wp-admin/menu.php'); // Handle plugin admin pages. if (isset($_GET['page'])) { + $plugin_page = stripslashes($_GET['page']); $plugin_page = plugin_basename($_GET['page']); $page_hook = get_plugin_page_hook($plugin_page, $pagenow); diff --git a/wp-includes/functions.php b/wp-includes/functions.php index ff653eb9c0..725b9a1e48 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -2142,7 +2142,6 @@ function register_deactivation_hook($file, $function) { function plugin_basename($file) { $file = preg_replace('/^.*wp-content[\\\\\/]plugins[\\\\\/]/', '', $file); - $file = stripslashes($file); return $file; }