From 6e66a60c3cbd5549ab5b1d5cb395e84c72d72d17 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Thu, 26 Jan 2017 14:20:15 +0000 Subject: [PATCH] Posts, Post Types: When using Excerpt mode on the Posts list table, ensure the excerpt output matches what was manually entered into the Excerpt field. Merges [39956] to the 3.9 branch. Built from https://develop.svn.wordpress.org/branches/3.9@39987 git-svn-id: http://core.svn.wordpress.org/branches/3.9@39924 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-posts-list-table.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-wp-posts-list-table.php b/wp-admin/includes/class-wp-posts-list-table.php index 1e763f2ff3..0d4fdc2fd5 100644 --- a/wp-admin/includes/class-wp-posts-list-table.php +++ b/wp-admin/includes/class-wp-posts-list-table.php @@ -638,8 +638,9 @@ class WP_Posts_List_Table extends WP_List_Table { echo '
' . $locked_avatar . ' ' . $locked_text . "
\n"; } - if ( ! $this->hierarchical_display && 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) ) - the_excerpt(); + if ( ! $this->hierarchical_display && 'excerpt' == $mode && current_user_can( 'read_post', $post->ID ) ) { + echo esc_html( get_the_excerpt() ); + } $actions = array(); if ( $can_edit_post && 'trash' != $post->post_status ) {