WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 2 months ago

#43280 assigned defect (bug)

Add rel="noopener" to target="_blank" links by default in image widget

Reported by: audrasjb Owned by: audrasjb
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.9.4
Component: Widgets Keywords: has-patch
Focuses: Cc:

Description

Core previously introduced rel="noopener" attribute to target="_blank" links –which is fine– but I think image widget should also add this attribute to image link. I know there is already a "Link rel" text input but I think we should add rel="noopener" attribute by default when "Open link in a new tab" option is checked and "Link rel" is empty.

Attachments (2)

43280.diff (634 bytes) - added by audrasjb 4 months ago.
Adds default rel noopener attribute when using target blank in media widget and Link rel field is empty
43280.2.diff (644 bytes) - added by audrasjb 2 months ago.
Adds both noopener and noreferrer values and refreshes the patch against trunk

Download all attachments as: .zip

Change History (7)

@audrasjb
4 months ago

Adds default rel noopener attribute when using target blank in media widget and Link rel field is empty

#1 @audrasjb
4 months ago

  • Keywords has-patch added

#3 @audrasjb
3 months ago

Related: #43290 (menu walker)

#4 @welcher
2 months ago

  • Owner set to audrasjb
  • Status changed from new to assigned

As per my comment in #43290, I'm thinking we should also add the noreferrer here as well to be consistent

#5 @welcher
2 months ago

  • Milestone changed from Awaiting Review to 5.0

@audrasjb
2 months ago

Adds both noopener and noreferrer values and refreshes the patch against trunk

Note: See TracTickets for help on using tickets.