From 05710aaa41c73939b4884c49be90eec506f1bae9 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Mon, 20 Apr 2015 07:38:29 +0000 Subject: [PATCH] Ensure post titles are correctly escaped on the Dashboard. Props helen, ocean90, dd32, pento. git-svn-id: https://develop.svn.wordpress.org/trunk@32175 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-comments-list-table.php | 4 ++-- src/wp-admin/includes/dashboard.php | 2 +- src/wp-admin/includes/template.php | 2 +- src/wp-admin/js/nav-menu.js | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index dfd95a6bf2..863585473b 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -561,9 +561,9 @@ class WP_Comments_List_Table extends WP_List_Table { if ( current_user_can( 'edit_post', $post->ID ) ) { $post_link = ""; - $post_link .= get_the_title( $post->ID ) . ''; + $post_link .= esc_html( get_the_title( $post->ID ) ) . ''; } else { - $post_link = get_the_title( $post->ID ); + $post_link = esc_html( get_the_title( $post->ID ) ); } echo '