Make WordPress Core

Ticket #21848: 21848.2.diff

File 21848.2.diff, 839 bytes (added by boonebgorges, 10 years ago)
  • src/wp-admin/includes/ajax-actions.php

    diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
    index 7a01af9..1555193 100644
    function wp_ajax_send_attachment_to_editor() { 
    24462446                $size = isset( $attachment['image-size'] ) ? $attachment['image-size'] : 'medium';
    24472447                $alt = isset( $attachment['image_alt'] ) ? $attachment['image_alt'] : '';
    24482448                $caption = isset( $attachment['post_excerpt'] ) ? $attachment['post_excerpt'] : '';
     2449                $caption = trim( $caption );
    24492450                $title = ''; // We no longer insert title tags into <img> tags, as they are redundant.
    24502451                $html = get_image_send_to_editor( $id, $caption, $title, $align, $url, (bool) $rel, $size, $alt );
    24512452        } elseif ( wp_attachment_is( 'video', $post ) || wp_attachment_is( 'audio', $post )  ) {