diff --git a/src/wp-includes/widgets/class-wp-widget-custom-html.php b/src/wp-includes/widgets/class-wp-widget-custom-html.php
index 5d2b28a..a0f878f 100644
a
|
b
|
class WP_Widget_Custom_HTML extends WP_Widget { |
143 | 143 | /** This filter is documented in wp-includes/widgets/class-wp-widget-text.php */ |
144 | 144 | $content = apply_filters( 'widget_text', $instance['content'], $simulated_text_widget_instance, $this ); |
145 | 145 | |
| 146 | // Adds rel noreferrer and noopener to all HTML A elements that have a target. |
| 147 | $content = wp_targeted_link_rel( $content ); |
| 148 | |
146 | 149 | /** |
147 | 150 | * Filters the content of the Custom HTML widget. |
148 | 151 | * |
diff --git a/src/wp-includes/widgets/class-wp-widget-text.php b/src/wp-includes/widgets/class-wp-widget-text.php
index 8db1735..7ca5c73 100644
a
|
b
|
class WP_Widget_Text extends WP_Widget { |
328 | 328 | |
329 | 329 | $text = preg_replace_callback( '#<(video|iframe|object|embed)\s[^>]*>#i', array( $this, 'inject_video_max_width_style' ), $text ); |
330 | 330 | |
| 331 | // Adds rel noreferrer and noopener to all HTML A elements that have a target. |
| 332 | $text = wp_targeted_link_rel( $text ); |
| 333 | |
331 | 334 | ?> |
332 | 335 | <div class="textwidget"><?php echo $text; ?></div> |
333 | 336 | <?php |