WordPress.org

Make WordPress Core

Changeset 35760


Ignore:
Timestamp:
12/03/2015 05:16:57 PM (5 years ago)
Author:
helen
Message:

Media: Avoid rel="rel=" situations.

props lucymtc, swissspidy.
fixes #34826. see #32074.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r35749 r35760  
    25712571    $url = empty( $attachment['url'] ) ? '' : $attachment['url'];
    25722572    if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) {
    2573         $rel = ' rel="attachment wp-att-' . $id . '"';
     2573        $rel = 'attachment wp-att-' . $id;
    25742574    }
    25752575
     
    25942594        $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : '';
    25952595        if ( ! empty( $url ) ) {
    2596             $html = '<a href="' . esc_url( $url ) . '"' . $rel . '>' . $html . '</a>';
     2596            $html = '<a href="' . esc_url( $url ) . '"' . 'rel="' . esc_attr( $rel ) . '">' . $html . '</a>';
    25972597        }
    25982598    }
Note: See TracChangeset for help on using the changeset viewer.