diff -r 7b1b88e27a20 -r 48c4eec2b7e6 wp/wp-includes/blocks/rss.php
--- a/wp/wp-includes/blocks/rss.php Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/blocks/rss.php Fri Sep 05 18:40:08 2025 +0200
@@ -8,6 +8,8 @@
/**
* Renders the `core/rss` block on server.
*
+ * @since 5.2.0
+ *
* @param array $attributes The block attributes.
*
* @return string Returns the block content with received rss items.
@@ -20,7 +22,7 @@
$rss = fetch_feed( $attributes['feedURL'] );
if ( is_wp_error( $rss ) ) {
- return '
' . __( 'RSS Error:' ) . ' ' . $rss->get_error_message() . '
';
+ return '' . __( 'RSS Error:' ) . ' ' . esc_html( $rss->get_error_message() ) . '
';
}
if ( ! $rss->get_item_quantity() ) {
@@ -48,8 +50,8 @@
if ( $date ) {
$date = sprintf(
' ',
- date_i18n( get_option( 'c' ), $date ),
- date_i18n( get_option( 'date_format' ), $date )
+ esc_attr( date_i18n( 'c', $date ) ),
+ esc_attr( date_i18n( get_option( 'date_format' ), $date ) )
);
}
}
@@ -107,6 +109,8 @@
/**
* Registers the `core/rss` block on server.
+ *
+ * @since 5.2.0
*/
function register_block_core_rss() {
register_block_type_from_metadata(