From b1cb849975afef3afcdc733320517db864cfd161 Mon Sep 17 00:00:00 2001 From: desrosj Date: Wed, 10 Jun 2020 18:52:57 +0000 Subject: [PATCH] General: Backport several commits for release. - Editor: Prevent HTML decoding on by setting the proper editor context. - Formatting: Ensure that wp_validate_redirect() sanitizes a wider variety of characters. - Themes: Ensure a broken theme name is returned properly. - Administration: Add a new filter to extend set-screen-option. Merges [47948-47951] to the 4.9 branch. Props xknown, sstoqnov, vortfu, SergeyBiryukov, whyisjake. Built from https://develop.svn.wordpress.org/branches/4.9@47967 git-svn-id: http://core.svn.wordpress.org/branches/4.9@47738 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 7 +++++-- wp-admin/includes/misc.php | 36 +++++++++++++++++++++++++++++------- wp-admin/themes.php | 2 +- wp-includes/pluggable.php | 2 +- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index aa9b7dd6fd..8517ca1936 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2831,8 +2831,11 @@ function edit_form_image_editor( $post ) { - post_content, 'attachment_content', $editor_args ); ?> + } + + ?> + + post_content ), 'attachment_content', $editor_args ); ?> - get( 'Name' ) ? $broken_theme->display( 'Name' ) : $broken_theme->get_stylesheet(); ?> + get( 'Name' ) ? $broken_theme->display( 'Name' ) : esc_html( $broken_theme->get_stylesheet() ); ?> errors()->get_error_message(); ?>