mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 04:48:25 +01:00
Admin: Escape attachment name in case it contains special characters
Merge of [37774] to the 4.3 branch. git-svn-id: https://develop.svn.wordpress.org/branches/4.3@37786 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d9b909a4d0
commit
266473e773
@ -361,7 +361,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
||||
<?php echo $link_end; ?>
|
||||
<?php _media_states( $post ); ?>
|
||||
</strong>
|
||||
<p class="filename"><span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span><?php echo wp_basename( $post->guid ); ?></p>
|
||||
<p class="filename"><span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span><?php echo esc_html( wp_basename( $post->guid ) ); ?></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
@ -1597,7 +1597,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
|
||||
* @param bool $icon Whether to include an icon. Default false.
|
||||
* @param string|bool $text If string, will be link text. Default false.
|
||||
*/
|
||||
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