Make WordPress Core

Ticket #31080: 31080.diff

File 31080.diff, 1.0 KB (added by stevenkword, 10 years ago)
  • wp-includes/post-template.php

     
    159159}
    160160
    161161/**
    162  * Display the Post Global Unique Identifier (guid).
     162 * Display the Post Global Unique Identifier (GUID).
    163163 *
    164  * The guid will appear to be a link, but should not be used as an link to the
    165  * post. The reason you should not use it as a link, is because of moving the
    166  * blog across domains.
     164 * While GUIDs generated by WordPress will be URLs it is important to note
     165 * that content migrated from other sources may have non-URL GUIDs which is
     166 * valid according to the RSS 2.0 specification.
    167167 *
    168  * Url is escaped to make it xml safe
     168 * The GUID is escaped to encode HTML entities and make it XML safe.
    169169 *
    170170 * @since 1.5.0
    171171 *
    172172 * @param int|WP_Post $id Optional. Post ID or post object.
    173173 */
    174174function the_guid( $id = 0 ) {
    175         echo esc_url( get_the_guid( $id ) );
     175        echo esc_html( get_the_guid( $id ) );
    176176}
    177177
    178178/**