Media: Avoid rel="rel=" situations.

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

Built from https://develop.svn.wordpress.org/trunk@35760


git-svn-id: http://core.svn.wordpress.org/trunk@35724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2015-12-03 17:17:26 +00:00
parent caf4b8270c
commit 2f287af8aa
2 changed files with 3 additions and 3 deletions

View File

@ -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>';
}
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-RC1-35759';
$wp_version = '4.4-RC1-35760';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.