esc_url the URL from get_upload_iframe_src. props jshreve, see #13383.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2010-05-14 15:03:59 +00:00
parent c13744a051
commit 518b19a404
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ function media_buttons() {
add_action( 'media_buttons', 'media_buttons' );
function _media_button($title, $icon, $type) {
return "<a href='" . get_upload_iframe_src($type) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' /></a>";
return "<a href='" . esc_url( get_upload_iframe_src($type) ) . "' id='add_$type' class='thickbox' title='$title'><img src='" . esc_url( admin_url( $icon ) ) . "' alt='$title' /></a>";
}
function get_upload_iframe_src($type) {

View File

@ -1143,7 +1143,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) {
function _wp_post_thumbnail_html( $thumbnail_id = NULL ) {
global $content_width, $_wp_additional_image_sizes;
$set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="' . get_upload_iframe_src('image') . '" id="set-post-thumbnail" class="thickbox">%s</a></p>';
$set_thumbnail_link = '<p class="hide-if-no-js"><a title="' . esc_attr__( 'Set featured image' ) . '" href="' . esc_url( get_upload_iframe_src('image') ) . '" id="set-post-thumbnail" class="thickbox">%s</a></p>';
$content = sprintf($set_thumbnail_link, esc_html__( 'Set featured image' ));
if ( $thumbnail_id && get_post( $thumbnail_id ) ) {