Make WordPress Core


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

Admin: Escape attachment name in case it contains special characters

Merge of [37774] to the 3.8 branch.

File:
1 edited

Legend:

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

    r27877 r37794  
    12051205        $link_text = $_post->post_title;
    12061206
    1207     return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
     1207    return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
    12081208}
    12091209
Note: See TracChangeset for help on using the changeset viewer.