diff --git a/includes/Hooks.php b/includes/Hooks.php index 279ab4e..f8d1582 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -98,7 +98,6 @@ class Hooks implements ParserFirstCallInitHook { return Utils::getErrorHtml( 'rss-empty', htmlspecialchars( $input ) ); } - // @phan-suppress-next-line SecurityCheck-XSS return $rss->renderFeed( $parser, $frame ); } diff --git a/includes/RSSParser.php b/includes/RSSParser.php index a18a63a..25cfab3 100644 --- a/includes/RSSParser.php +++ b/includes/RSSParser.php @@ -391,6 +391,7 @@ class RSSParser { */ public function renderFeed( $parser, $frame ) { $renderedFeed = ''; + $wikitextFeed = ''; if ( isset( $this->itemTemplate ) && isset( $parser ) && isset( $frame ) ) { $headcnt = 0; @@ -404,12 +405,12 @@ class RSSParser { } if ( $this->canDisplay( $item ) ) { - $renderedFeed .= $this->renderItem( $item, $parser ) . "\n"; + $wikitextFeed .= $this->renderItem( $item, $parser ) . "\n"; $headcnt++; } } - $renderedFeed = $this->sandboxParse( $renderedFeed, $parser ); + $renderedFeed = $this->sandboxParse( $wikitextFeed, $parser ); }