diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php
index 31f1b436c9..b91efdb536 100644
--- a/wp-includes/general-template.php
+++ b/wp-includes/general-template.php
@@ -3450,25 +3450,25 @@ function get_the_generator( $type = '' ) {
switch ( $type ) {
case 'html':
- $gen = '';
+ $gen = '';
break;
case 'xhtml':
- $gen = '';
+ $gen = '';
break;
case 'atom':
- $gen = 'WordPress';
+ $gen = 'WordPress';
break;
case 'rss2':
- $gen = 'https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) . '';
+ $gen = '' . esc_url_raw( 'https://wordpress.org/?v=' . get_bloginfo_rss( 'version' ) ) . '';
break;
case 'rdf':
- $gen = '';
+ $gen = '';
break;
case 'comment':
- $gen = '';
+ $gen = '';
break;
case 'export':
- $gen = '';
+ $gen = '';
break;
}