diff --git a/wp-admin/includes/class-wp-plugins-list-table.php b/wp-admin/includes/class-wp-plugins-list-table.php index f87f3218bd..b12be2a487 100644 --- a/wp-admin/includes/class-wp-plugins-list-table.php +++ b/wp-admin/includes/class-wp-plugins-list-table.php @@ -550,16 +550,16 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( $is_active ) { if ( current_user_can( 'manage_network_plugins' ) ) { /* translators: %s: plugin name */ - $actions['deactivate'] = '' . __( 'Network Deactivate' ) . ''; + $actions['deactivate'] = '' . __( 'Network Deactivate' ) . ''; } } else { if ( current_user_can( 'manage_network_plugins' ) ) { /* translators: %s: plugin name */ - $actions['activate'] = '' . __( 'Network Activate' ) . ''; + $actions['activate'] = '' . __( 'Network Activate' ) . ''; } if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { /* translators: %s: plugin name */ - $actions['delete'] = '' . __( 'Delete' ) . ''; + $actions['delete'] = '' . __( 'Delete' ) . ''; } } } else { @@ -573,14 +573,14 @@ class WP_Plugins_List_Table extends WP_List_Table { ); } elseif ( $is_active ) { /* translators: %s: plugin name */ - $actions['deactivate'] = '' . __( 'Deactivate' ) . ''; + $actions['deactivate'] = '' . __( 'Deactivate' ) . ''; } else { /* translators: %s: plugin name */ - $actions['activate'] = '' . __( 'Activate' ) . ''; + $actions['activate'] = '' . __( 'Activate' ) . ''; if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) { /* translators: %s: plugin name */ - $actions['delete'] = '' . __( 'Delete' ) . ''; + $actions['delete'] = '' . __( 'Delete' ) . ''; } } // end if $is_active @@ -588,7 +588,7 @@ class WP_Plugins_List_Table extends WP_List_Table { if ( ( ! is_multisite() || $screen->in_admin( 'network' ) ) && current_user_can( 'edit_plugins' ) && is_writable( WP_PLUGIN_DIR . '/' . $plugin_file ) ) { /* translators: %s: plugin name */ - $actions['edit'] = '' . __( 'Edit' ) . ''; + $actions['edit'] = '' . __( 'Edit' ) . ''; } } // end if $context diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 42a57eef16..890df25abb 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -769,7 +769,7 @@ function page_template_dropdown( $default = '' ) { ksort( $templates ); foreach ( array_keys( $templates ) as $template ) { $selected = selected( $default, $templates[ $template ], false ); - echo "\n\t"; + echo "\n\t"; } } diff --git a/wp-admin/plugin-editor.php b/wp-admin/plugin-editor.php index 1558164096..3a7cc25008 100644 --- a/wp-admin/plugin-editor.php +++ b/wp-admin/plugin-editor.php @@ -96,9 +96,9 @@ default: wp_die( $error ); if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) ) - activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error + activate_plugin($file, "plugin-editor.php?file=" . urlencode( $file ) . "&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error - wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") ); + wp_redirect( self_admin_url("plugin-editor.php?file=" . urlencode( $file ) . "&a=te&scrollto=$scrollto") ); exit; } @@ -191,18 +191,18 @@ default: if ( is_plugin_active( $plugin ) ) { if ( is_writeable( $real_file ) ) { /* translators: %s: plugin file name */ - echo sprintf( __( 'Editing %s (active)' ), '' . $file . '' ); + echo sprintf( __( 'Editing %s (active)' ), '' . esc_html( $file ) . '' ); } else { /* translators: %s: plugin file name */ - echo sprintf( __( 'Browsing %s (active)' ), '' . $file . '' ); + echo sprintf( __( 'Browsing %s (active)' ), '' . esc_html( $file ) . '' ); } } else { if ( is_writeable( $real_file ) ) { /* translators: %s: plugin file name */ - echo sprintf( __( 'Editing %s (inactive)' ), '' . $file . '' ); + echo sprintf( __( 'Editing %s (inactive)' ), '' . esc_html( $file ) . '' ); } else { /* translators: %s: plugin file name */ - echo sprintf( __( 'Browsing %s (inactive)' ), '' . $file . '' ); + echo sprintf( __( 'Browsing %s (inactive)' ), '' . esc_html( $file ) . '' ); } } ?> @@ -247,7 +247,7 @@ foreach ( $plugin_files as $plugin_file ) : continue; } ?> -