mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 06:42:56 +02:00
Admin: Escape attachment name in case it contains special characters
Merge of [37774] to the 4.2 branch. Built from https://develop.svn.wordpress.org/branches/4.2@37789 git-svn-id: http://core.svn.wordpress.org/branches/4.2@37754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b4bf158d3a
commit
437f727e8f
@ -341,7 +341,7 @@ foreach ( $columns as $column_name => $column_display_name ) {
|
|||||||
<?php echo $att_title; ?></a>
|
<?php echo $att_title; ?></a>
|
||||||
<?php };
|
<?php };
|
||||||
_media_states( $post ); ?></strong>
|
_media_states( $post ); ?></strong>
|
||||||
<p class="filename"><?php echo wp_basename( $post->guid ); ?></p>
|
<p class="filename"><?php echo esc_html( wp_basename( $post->guid ) ); ?></p>
|
||||||
<?php
|
<?php
|
||||||
echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
|
echo $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
|
||||||
?>
|
?>
|
||||||
|
@ -1562,7 +1562,7 @@ function wp_get_attachment_link( $id = 0, $size = 'thumbnail', $permalink = fals
|
|||||||
* @param bool $icon Whether to include an icon. Default false.
|
* @param bool $icon Whether to include an icon. Default false.
|
||||||
* @param string|bool $text If string, will be link text. 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…
Reference in New Issue
Block a user