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/custom-html-widget.php

    r48937 r49215  
    305305
    306306    /**
    307      * Ensure that rel="noopener noreferrer" is added to links with a target.
     307     * Ensure that rel="noopener" is added to links with a target.
    308308     *
    309309     * @ticket 46421
     
    327327
    328328        $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) );
    329         $this->assertContains( 'rel="noopener noreferrer"', $output );
    330     }
    331 
    332     /**
    333      * Ensure that rel="noopener noreferrer" is not added to links without a target.
     329        $this->assertContains( 'rel="noopener"', $output );
     330    }
     331
     332    /**
     333     * Ensure that rel="noopener" is not added to links without a target.
    334334     *
    335335     * @ticket 46421
     
    353353
    354354        $output = get_echo( array( $widget, 'widget' ), array( $args, $instance ) );
    355         $this->assertNotContains( 'rel="noopener noreferrer"', $output );
     355        $this->assertNotContains( 'rel="noopener"', $output );
    356356    }
    357357
Note: See TracChangeset for help on using the changeset viewer.