Admin: Escape attachment name in case it contains special characters
Merge of [37774] to the 3.7 branch. git-svn-id: https://develop.svn.wordpress.org/branches/3.7@37795 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e41b5e43e9
commit
92957ea924
@ -1204,7 +1204,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
|
||||
if ( trim( $link_text ) == '' )
|
||||
$link_text = $_post->post_title;
|
||||
|
||||
return apply_filters( 'wp_get_attachment_link', "<a href='$url'>$link_text</a>", $id, $size, $permalink, $icon, $text );
|
||||
return apply_filters( 'wp_get_attachment_link', "<a href='" . esc_url( $url ) . "'>$link_text</a>", $id, $size, $permalink, $icon, $text );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user