WordPress.org

Make WordPress Core

Changeset 37793


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

Admin: Escape attachment name in case it contains special characters

Merge of [37774] to the 3.9 branch.

File:
1 edited

Legend:

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

    r27908 r37793  
    14371437     * @param string|bool $text      If string, will be link text. Default false.
    14381438     */
    1439     return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
     1439    return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
    14401440}
    14411441
Note: See TracChangeset for help on using the changeset viewer.