From 49192afff9c10220f50047d80d8d1197da258ad6 Mon Sep 17 00:00:00 2001 From: Andrew Ozz 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: https://develop.svn.wordpress.org/trunk@12235 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 aea313277d..ff95f96745 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;