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: https://develop.svn.wordpress.org/trunk@3139 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-11-17 23:01:28 +00:00
parent c6c21c0d26
commit d13f35cdec
2 changed files with 1 additions and 1 deletions

View File

@ -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);

View File

@ -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;
}