| 1 | --- a/wp-includes/widgets.php
|
|---|
| 2 | +++ b/wp-includes/widgets.php
|
|---|
| 3 | @@ function wp_widget_rss_output( $rss, $args = array() ) {
|
|---|
| 4 | - $desc = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
|
|---|
| 5 | - $desc = esc_attr( wp_trim_words( $desc, 55, ' […]' ) );
|
|---|
| 6 | + // Decode HTML entities first.
|
|---|
| 7 | + $desc = html_entity_decode( $item->get_description(), ENT_QUOTES, get_option( 'blog_charset' ) );
|
|---|
| 8 | +
|
|---|
| 9 | + // Remove any HTML tags or leftover entities for clean widget output.
|
|---|
| 10 | + $desc = wp_strip_all_tags( $desc );
|
|---|
| 11 | +
|
|---|
| 12 | + // Trim description to 55 words and prepare for display.
|
|---|
| 13 | + $desc = esc_html( wp_trim_words( $desc, 55, ' […]' ) );
|
|---|