diff --git a/wp-includes/version.php b/wp-includes/version.php index 27de66ec37..edd6fb2fa0 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta1-45142'; +$wp_version = '5.2-beta1-45143'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/widgets/class-wp-widget-custom-html.php b/wp-includes/widgets/class-wp-widget-custom-html.php index 5d2b28a17c..93fb579e91 100644 --- a/wp-includes/widgets/class-wp-widget-custom-html.php +++ b/wp-includes/widgets/class-wp-widget-custom-html.php @@ -143,6 +143,9 @@ class WP_Widget_Custom_HTML extends WP_Widget { /** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */ $content = apply_filters( 'widget_text', $instance['content'], $simulated_text_widget_instance, $this ); + // Adds noreferrer and noopener relationships, without duplicating values, to all HTML A elements that have a target. + $content = wp_targeted_link_rel( $content ); + /** * Filters the content of the Custom HTML widget. * diff --git a/wp-includes/widgets/class-wp-widget-text.php b/wp-includes/widgets/class-wp-widget-text.php index 8db1735198..ce424b49bb 100644 --- a/wp-includes/widgets/class-wp-widget-text.php +++ b/wp-includes/widgets/class-wp-widget-text.php @@ -328,6 +328,9 @@ class WP_Widget_Text extends WP_Widget { $text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text ); + // Adds noreferrer and noopener relationships, without duplicating values, to all HTML A elements that have a target. + $text = wp_targeted_link_rel( $text ); + ?>