Skip to content

Commit

Permalink
Fix feed authors with escaped html in their name
Browse files Browse the repository at this point in the history
  • Loading branch information
akirk committed Jan 2, 2025
1 parent 2cf2b1e commit 2d3f20d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion feed-parsers/class-feed-parser-simplepie.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,10 @@ public function process_items( $items, $url ) {
}

if ( is_object( $item->get_author() ) ) {
$feed_item->author = \wp_strip_all_tags( $item->get_author()->name );
$feed_item->author = $item->get_author()->name;
// 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 );
}

$feed_item->date = $item->get_gmdate( 'U' );
Expand Down

0 comments on commit 2d3f20d

Please sign in to comment.