From e0dfa1ff54872aaee1393e3ada5ca0bb778def30 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 19 Mar 2025 23:15:35 +0000 Subject: [PATCH] General: Remove `noopener` from links opening in a new tab in `wp_list_bookmarks()`. This changeset removes the automatic addition of `rel="noopener"` from links targeting a new tab via `target="_blank"` in the `wp_list_bookmarks()` function. Since this was introduced, supported browsers have changed their security policies and no longer allow the opened link to have JavaScript access to the previous tab. This also removes the unit test cases previously located in `wpListBookmarks.php` as they were dedicated to test the presence of `rel="noopener"`. Follow-up to [52061], [59120]. Props audrasjb, rvouill, marineevain, jeremy80. Fixes #63096. Built from https://develop.svn.wordpress.org/trunk@60058 git-svn-id: http://core.svn.wordpress.org/trunk@59394 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/bookmark-template.php | 8 -------- wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/wp-includes/bookmark-template.php b/wp-includes/bookmark-template.php index af48fbfdca..893494a7e9 100644 --- a/wp-includes/bookmark-template.php +++ b/wp-includes/bookmark-template.php @@ -105,14 +105,6 @@ function _walk_bookmarks( $bookmarks, $args = '' ) { $target = $bookmark->link_target; if ( '' !== $target ) { - if ( is_string( $rel ) && '' !== $rel ) { - if ( ! str_contains( $rel, 'noopener' ) ) { - $rel = trim( $rel ) . ' noopener'; - } - } else { - $rel = 'noopener'; - } - $target = ' target="' . $target . '"'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index cae7ca0165..b7c6a99599 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-beta3-60057'; +$wp_version = '6.8-beta3-60058'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.