Skip to content

Commit

Permalink
Ensure author is a string
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Feb 13, 2025
1 parent 129915e commit 47c7853
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions feed-parsers/class-feed-parser-simplepie.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ public function process_items( $items, $url ) {

if ( is_object( $item->get_author() ) ) {
$feed_item->author = $item->get_author()->name;
if ( ! $feed_item->author ) {
$feed_item->author = '';
}
// Strip HTML tags, even if they are escaped.
$feed_item->author = htmlspecialchars_decode( $feed_item->author, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401 );
$feed_item->author = \wp_strip_all_tags( $feed_item->author );
Expand Down

0 comments on commit 47c7853

Please sign in to comment.