From 55f1e1fab7ef3199a165d31ead611da0345c36ea Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Wed, 10 Jun 2020 18:46:19 +0000 Subject: [PATCH] General: Backport several commits for release. - Embeds: Ensure that the title attribute is set correctly on embeds. - 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 [47947-47951] to the 4.7 branch. Props xknown, sstoqnov, vortfu, SergeyBiryukov, whyisjake. git-svn-id: https://develop.svn.wordpress.org/branches/4.7@47978 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/media.php | 7 +++++-- src/wp-admin/includes/misc.php | 36 ++++++++++++++++++++++++++------- src/wp-admin/themes.php | 2 +- src/wp-includes/pluggable.php | 2 +- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php index c4090174fa..d0d5a94c52 100644 --- a/src/wp-admin/includes/media.php +++ b/src/wp-admin/includes/media.php @@ -2825,8 +2825,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(); ?>