diff --git a/src/RSSFeed.php b/src/RSSFeed.php index b6439f5b04d..d2b291b26d3 100644 --- a/src/RSSFeed.php +++ b/src/RSSFeed.php @@ -36,6 +36,7 @@ use Glpi\Application\View\TemplateRenderer; use Glpi\RichText\RichText; use Glpi\Toolbox\Sanitizer; +use Glpi\Toolbox\URL; // $feed = new SimplePie(); // $feed->set_cache_location('../files/_rss'); @@ -853,7 +854,7 @@ public function showFeedContent() foreach ($feed->get_items(0, $this->fields['max_items']) as $item) { $rss_feed['items'][] = [ 'title' => $item->get_title(), - 'link' => $item->get_permalink(), + 'link' => URL::sanitizeURL($item->get_permalink()), 'timestamp' => Html::convDateTime($item->get_date('Y-m-d H:i:s')), 'content' => $item->get_content() ]; @@ -897,7 +898,7 @@ public function showDiscoveredFeeds() $newurl = $f->url; $newfeed = self::getRSSFeed($newurl); if ($newfeed && !$newfeed->error()) { - $link = $newfeed->get_permalink(); + $link = URL::sanitizeURL($newfeed->get_permalink()); if (!empty($link)) { echo "" . $newfeed->get_title() . " "; Html::showSimpleForm( @@ -1071,21 +1072,21 @@ public static function showListForCentral(bool $personal = true, bool $display = $output .= "