From 7ea1782edf9bcf6c693901ce854a7c57a63a68c4 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Fri, 19 Oct 2018 06:41:29 -0400 Subject: [PATCH] Decode HTML special chars in summary --- includes/client/posts.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/client/posts.php b/includes/client/posts.php index f8edb70..fe02a9f 100644 --- a/includes/client/posts.php +++ b/includes/client/posts.php @@ -43,7 +43,11 @@ function post_to_object( $post ) { $permalink = get_permalink( $post ); $summary = null; if ( $post->post_content ) { - $summary = get_the_excerpt( $post ); + $summary = \html_entity_decode( + get_the_excerpt( $post ), + ENT_QUOTES, + 'UTF-8' + ); } $matches = array(); if ( preg_match( '/(.+)__trashed\/$/', $permalink, $matches ) ) {