diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index d96a2fb..5873445 100644
|
|
|
function wp_ajax_send_attachment_to_editor() {
|
| 2570 | 2570 | $rel = ''; |
| 2571 | 2571 | $url = empty( $attachment['url'] ) ? '' : $attachment['url']; |
| 2572 | 2572 | if ( strpos( $url, 'attachment_id') || get_attachment_link( $id ) == $url ) { |
| 2573 | | $rel = ' rel="attachment wp-att-' . $id . '"'; |
| | 2573 | $rel = 'attachment wp-att-' . $id; |
| 2574 | 2574 | } |
| 2575 | 2575 | |
| 2576 | 2576 | remove_filter( 'media_send_to_editor', 'image_media_send_to_editor' ); |
| … |
… |
function wp_ajax_send_attachment_to_editor() {
|
| 2593 | 2593 | } else { |
| 2594 | 2594 | $html = isset( $attachment['post_title'] ) ? $attachment['post_title'] : ''; |
| 2595 | 2595 | 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>'; |
| 2597 | 2597 | } |
| 2598 | 2598 | } |
| 2599 | 2599 | |