mirror of
git://develop.git.wordpress.org/
synced 2025-01-18 05:18:42 +01:00
Media: Avoid rel="rel="
situations.
props lucymtc, swissspidy. fixes #34826. see #32074. git-svn-id: https://develop.svn.wordpress.org/trunk@35760 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
76367a145e
commit
3e85312bbf
@ -2570,7 +2570,7 @@ function wp_ajax_send_attachment_to_editor() {
|
||||
$rel = '';
|
||||
$url = empty( $attachment['url'] ) ? '' : $attachment['url'];
|
||||
if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) {
|
||||
$rel = ' rel="attachment wp-att-' . $id . '"';
|
||||
$rel = 'attachment wp-att-' . $id;
|
||||
}
|
||||
|
||||
remove_filter( 'media_send_to_editor', 'image_media_send_to_editor' );
|
||||
@ -2593,7 +2593,7 @@ function wp_ajax_send_attachment_to_editor() {
|
||||
} else {
|
||||
$html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : '';
|
||||
if ( ! empty( $url ) ) {
|
||||
$html = '<a href="' . esc_url( $url ) . '"' . $rel . '>' . $html . '</a>';
|
||||
$html = '<a href="' . esc_url( $url ) . '"' . 'rel="' . esc_attr( $rel ) . '">' . $html . '</a>';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user