[wp-trac] [WordPress Trac] #49558: Remove noreferrer from wp_targeted_link_rel and other uses

WordPress Trac noreply at wordpress.org
Tue Oct 20 04:01:01 UTC 2020


#49558: Remove noreferrer from wp_targeted_link_rel and other uses
---------------------------------------------+-----------------------------
 Reporter:  joostdevalk                      |       Owner:  SergeyBiryukov
     Type:  enhancement                      |      Status:  reopened
 Priority:  normal                           |   Milestone:  5.6
Component:  General                          |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  has-unit-tests has-patch commit  |     Focuses:
---------------------------------------------+-----------------------------
Changes (by antpb):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 I'm suddenly getting failures running `npm run test:php` on my local that
 is up to date with trunk. They seem similar to the changes from this
 ticket. @SergeyBiryukov is this patch possibly causing it? I've shared a
 bit of the output below.

 {{{
 There were 22 failures:
 1) Tests_Targeted_Link_Rel::test_add_to_links_with_target_blank
 Failed asserting that two strings are identical.
 --- Expected
 +++ Actual
 @@ @@
 -'<p>Links: <a href="/" target="_blank" rel="noopener">No rel</a></p>'
 +'<p>Links: <a href="/" target="_blank" rel="noopener noreferrer">No
 rel</a></p>'
 /var/www/tests/phpunit/tests/formatting/WPTargetedLinkRel.php:12
 2) Tests_Targeted_Link_Rel::test_add_to_links_with_target_foo
 Failed asserting that two strings are identical.
 --- Expected
 +++ Actual
 @@ @@
 -'<p>Links: <a href="/" target="foo" rel="noopener">No rel</a></p>'
 +'<p>Links: <a href="/" target="foo" rel="noopener noreferrer">No
 rel</a></p>'
 /var/www/tests/phpunit/tests/formatting/WPTargetedLinkRel.php:18
 3) Tests_Targeted_Link_Rel::test_target_as_first_attribute
 Failed asserting that two strings are identical.
 --- Expected
 +++ Actual
 @@ @@
 -'<p>Links: <a target="_blank" href="#" rel="noopener">No rel</a></p>'
 +'<p>Links: <a target="_blank" href="#" rel="noopener noreferrer">No
 rel</a></p>'
 /var/www/tests/phpunit/tests/formatting/WPTargetedLinkRel.php:24
 4) Tests_Targeted_Link_Rel::test_add_to_existing_rel
 Failed asserting that two strings are identical.
 --- Expected
 +++ Actual
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49558#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list