mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-03 16:50:13 +00:00
General: Remove noreferrer from wp_targeted_link_rel() and other uses.
When `noopener noreferrer` was originally added in #37941 and related tickets, the `noreferrer` bit was specifically included due to Firefox not supporting `noopener` at the time. Since `noopener` has been supported by all major browsers for a while, it should now be safe to remove the `noreferrer` attribute from core. Props Mista-Flo, audrasjb, joostdevalk, jonoaldersonwp, peterwilsoncc, elgameel. Fixes #49558. git-svn-id: https://develop.svn.wordpress.org/trunk@49215 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -146,7 +146,7 @@ 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.
|
||||
// Adds 'noopener' relationship, without duplicating values, to all HTML A elements that have a target.
|
||||
$content = wp_targeted_link_rel( $content );
|
||||
|
||||
/**
|
||||
|
||||
@@ -331,7 +331,7 @@ 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.
|
||||
// Adds 'noopener' relationship, without duplicating values, to all HTML A elements that have a target.
|
||||
$text = wp_targeted_link_rel( $text );
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user