From 85b81cc6cf90211be726f3ddb7d8e673e452a829 Mon Sep 17 00:00:00 2001 From: azaozz Date: Fri, 20 Nov 2009 01:31:06 +0000 Subject: [PATCH] Escape $title in dashboard Recent Drafts to reveal HTML tags, props Simek, fixes #11128 git-svn-id: http://svn.automattic.com/wordpress/trunk@12235 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/dashboard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index aea313277..ff95f9674 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -448,7 +448,7 @@ function wp_dashboard_recent_drafts( $drafts = false ) { foreach ( $drafts as $draft ) { $url = get_edit_post_link( $draft->ID ); $title = _draft_or_post_title( $draft->ID ); - $item = "

$title " . get_the_time( get_option( 'date_format' ), $draft ) . '

'; + $item = "

" . esc_html($title) . " " . get_the_time( get_option( 'date_format' ), $draft ) . '

'; if ( $the_content = preg_split( '#\s#', strip_tags( $draft->post_content ), 11, PREG_SPLIT_NO_EMPTY ) ) $item .= '

' . join( ' ', array_slice( $the_content, 0, 10 ) ) . ( 10 < count( $the_content ) ? '…' : '' ) . '

'; $list[] = $item;