RSS: Add atom self link

https://validator.w3.org/feed/docs/warning/MissingAtomSelfLink.html
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Justin Kromlinger 2020-11-19 23:16:17 +01:00 committed by Lukas Fleischer
parent bc972089a1
commit 568e0d2fa3

View file

@ -906,12 +906,13 @@ class RSSCreator091 extends FeedCreator {
$feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
$feed.= $this->_createGeneratorComment();
$feed.= $this->_createStylesheetReferences();
$feed.= "<rss version=\"".$this->RSSVersion."\">\n";
$feed.= "<rss version=\"".$this->RSSVersion."\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
$feed.= " <channel>\n";
$feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
$this->descriptionTruncSize = 500;
$feed.= " <description>".$this->getDescription()."</description>\n";
$feed.= " <link>".$this->link."</link>\n";
$feed.= " <atom:link href=\"".$this->syndicationURL."\" rel=\"self\" type=\"application/rss+xml\" />\n";
$now = new FeedDate();
$feed.= " <lastBuildDate>".htmlspecialchars($now->rfc822())."</lastBuildDate>\n";
$feed.= " <generator>".FEEDCREATOR_VERSION."</generator>\n";