Make WordPress Core

Changeset 37792


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

Admin: Escape attachment name in case it contains special characters

Merge of [37774] to the 4.0 branch.

File:
1 edited

Legend:

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

    r29429 r37792  
    14971497     * @param string|bool $text      If string, will be link text. Default false.
    14981498     */
    1499     return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
     1499    return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
    15001500}
    15011501
Note: See TracChangeset for help on using the changeset viewer.