RSS Block: Decode HTML entities in feed titles before display #70491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
Closes #70477
Follows the implementation of: WordPress/wordpress-develop#9042 by @Infinite-Null
Related Trac ticket: https://core.trac.wordpress.org/ticket/63611
Fixes RSS Block to properly handle HTML entities in feed titles by decoding them before stripping tags and escaping for display.
Why?
RSS feeds from third-party sources sometimes include HTML entities in their titles. Currently, these entities are displayed as literal text instead of being properly decoded and stripped, resulting in unsightly
<em>
appearing in the rendered titles on the frontend.How?
Modified the title processing in
packages/block-library/src/rss/index.php
to:html_entity_decode()
with appropriate flagsTesting Instructions
Screenshots