diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php
index 2738a2137b..b9bf72d885 100644
--- a/wp-admin/includes/media.php
+++ b/wp-admin/includes/media.php
@@ -3039,7 +3039,7 @@ 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(); ?> |
asXML();
}
+/**
+ * Filters the given oEmbed HTML to make sure iframes have a title attribute.
+ *
+ * @since 5.2.0
+ *
+ * @param string $result The oEmbed HTML result.
+ * @param object $data A data object result from an oEmbed provider.
+ * @param string $url The URL of the content to be embedded.
+ * @return string The filtered oEmbed result.
+ */
+function wp_filter_oembed_iframe_title_attribute( $result, $data, $url ) {
+ if ( false === $result || ! in_array( $data->type, array( 'rich', 'video' ), true ) ) {
+ return $result;
+ }
+
+ $title = ! empty( $data->title ) ? $data->title : '';
+
+ $pattern = '`