Make WordPress Core


Ignore:
Timestamp:
06/21/2016 02:18:27 PM (8 years ago)
Author:
nbachiyski
Message:

Admin: Escape attachment name in case it contains special characters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r37706 r37774  
    14761476     * @param string|bool  $text      If string, will be link text. Default false.
    14771477     */
    1478     return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
     1478    return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
    14791479}
    14801480
Note: See TracChangeset for help on using the changeset viewer.