Make WordPress Core

Ticket #41020: 41020.2.patch

File 41020.2.patch, 3.6 KB (added by shedonist, 5 years ago)

Added rel="noopener noreferrer" to the event title links and the external links in the footer of the same widget.

  • wp-admin/css/dashboard-rtl.css

     
    430430.community-events .event-title {
    431431        font-weight: 600;
    432432        display: block;
     433        line-height: 1.5;
    433434}
    434435
     436.community-events .event-title .dashicons-external {
     437        display: inline-block; /* Display for all users even those not visually impaired */
     438}
     439
    435440.community-events .event-date,
    436441.community-events .event-time {
    437442        display: block;
  • wp-admin/css/dashboard.css

     
    430430.community-events .event-title {
    431431        font-weight: 600;
    432432        display: block;
     433        line-height: 1.5;
    433434}
    434435
     436.community-events .event-title .dashicons-external {
     437        display: inline-block; /* Display for all users even those not visually impaired */
     438}
     439
    435440.community-events .event-date,
    436441.community-events .event-time {
    437442        display: block;
  • wp-admin/includes/dashboard.php

     
    11161116        <p class="community-events-footer">
    11171117                <?php
    11181118                        printf(
    1119                                 '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1119                                '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
    11201120                                'https://make.wordpress.org/community/meetups-landing-page',
    11211121                                __( 'Meetups' ),
    11221122                                /* translators: accessibility text */
     
    11281128
    11291129                <?php
    11301130                        printf(
    1131                                 '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1131                                '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
    11321132                                'https://central.wordcamp.org/schedule/',
    11331133                                __( 'WordCamps' ),
    11341134                                /* translators: accessibility text */
     
    11401140
    11411141                <?php
    11421142                        printf(
    1143                                 '<a href="%1$s" target="_blank">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1143                                '<a href="%1$s" target="_blank" rel="noopener noreferrer">%2$s <span class="screen-reader-text">%3$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
    11441144                                /* translators: If a Rosetta site exists (e.g. https://es.wordpress.org/news/), then use that. Otherwise, leave untranslated. */
    11451145                                esc_url( _x( 'https://wordpress.org/news/', 'Events and News dashboard widget' ) ),
    11461146                                __( 'News' ),
     
    12631263                                <div class="event-info">
    12641264                                        <div class="dashicons event-icon" aria-hidden="true"></div>
    12651265                                        <div class="event-info-inner">
    1266                                                 <a class="event-title" href="{{ event.url }}">{{ event.title }}</a>
     1266                                                <?php
     1267                                                printf(
     1268                                                        '<a class="event-title" href="{{ event.url }}" target="_blank" rel="noopener noreferrer">{{ event.title }} <span class="screen-reader-text">%1$s</span><span aria-hidden="true" class="dashicons dashicons-external"></span></a>',
     1269                                                        /* translators: accessibility text */
     1270                                                        __( '(opens in a new window)' )
     1271                                                );
     1272                                                ?>
    12671273                                                <span class="event-city">{{ event.location.location }}</span>
    12681274                                        </div>
    12691275                                </div>