Make WordPress Core

Changeset 37795


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

Admin: Escape attachment name in case it contains special characters

Merge of [37774] to the 3.7 branch.

File:
1 edited

Legend:

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

    r25868 r37795  
    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.