WordPress.org

Make WordPress Core

Ticket #39955: 39955.diff

File 39955.diff, 555 bytes (added by csloisel, 2 years ago)

Decode entities in author name on attachment js data prep

  • src/wp-includes/media.php

    diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php
    index 6843c61..e95c01c 100644
    a b function wp_prepare_attachment_for_js( $attachment ) { 
    30983098        );
    30993099
    31003100        $author = new WP_User( $attachment->post_author );
    3101         $response['authorName'] = $author->display_name;
     3101        $response['authorName'] = html_entity_decode( $author->display_name, ENT_QUOTES, get_bloginfo( 'charset' ) );
    31023102
    31033103        if ( $attachment->post_parent ) {
    31043104                $post_parent = get_post( $attachment->post_parent );