[wp-trac] [WordPress Trac] #53843: Remove adding of rel="noopener" to links with target="_blank"
WordPress Trac
noreply at wordpress.org
Wed Dec 13 21:25:47 UTC 2023
#53843: Remove adding of rel="noopener" to links with target="_blank"
-------------------------+---------------------
Reporter: azaozz | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.5
Component: General | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
-------------------------+---------------------
Changes (by TobiasBg):
* keywords: => needs-patch
* milestone: Future Release => 6.5
Comment:
The time has come, I think.
Quotes from https://developer.mozilla.org/en-
US/docs/Web/HTML/Element/a#browser_compatibility :
Note: Setting target="_blank" on <a> elements implicitly provides the
same rel behavior as setting rel="noopener" which does not set
window.opener.
[I]n newer browser versions setting target="_blank" implicitly provides
the same protection as setting rel="noopener".
All major browsers have shown this behavior for more than 2-3 years now,
meaning that all browser that are still supported by WordPress support
this (unless I have overlooked something).
We should consider deprecating `wp_targeted_link_rel()` and related
functions and stop adding it as a filter hook callback to a bunch of
hooks.
`noopener` in static `<a>` tags in wp-admin can be removed, too. I don't
think it's worth the risk to remove it from post content though.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53843#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list