Make WordPress Core


Ignore:
Timestamp:
10/19/2020 11:37:53 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/widgets/text-widget.php

    r48937 r49215  
    10041004
    10051005    /**
    1006      * Ensure that rel="noopener noreferrer" is added to links with a target.
     1006     * Ensure that rel="noopener" is added to links with a target.
    10071007     *
    10081008     * @ticket 46421
     
    10271027        $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) );
    10281028
    1029         $this->assertContains( 'rel="noopener noreferrer"', $output );
    1030     }
    1031 
    1032     /**
    1033      * Ensure that rel="noopener noreferrer" is not added to links without a target.
     1029        $this->assertContains( 'rel="noopener"', $output );
     1030    }
     1031
     1032    /**
     1033     * Ensure that rel="noopener" is not added to links without a target.
    10341034     *
    10351035     * @ticket 46421
     
    10541054        $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) );
    10551055
    1056         $this->assertNotContains( 'rel="noopener noreferrer"', $output );
     1056        $this->assertNotContains( 'rel="noopener"', $output );
    10571057    }
    10581058}
Note: See TracChangeset for help on using the changeset viewer.