diff options
Diffstat (limited to 'utils/rss.php')
-rw-r--r-- | utils/rss.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/utils/rss.php b/utils/rss.php index 6f909d3..bed69ce 100644 --- a/utils/rss.php +++ b/utils/rss.php @@ -56,9 +56,10 @@ class RSS { $fp = fopen($this->rssfile, "w"); fwrite($fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); - fwrite($fp, "<rss version=\"2.0\">\n"); + fwrite($fp, "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n"); fwrite($fp, " <channel>\n"); fwrite($fp, " <title>".$RSS_TITLE."</title>\n"); + fwrite($fp, " <atom:link href=\"".$RSS_URL."/rss.xml\" rel=\"self\" type=\"application/rss+xml\" />\n"); fwrite($fp, " <link>".$RSS_URL."</link>\n"); fwrite($fp, " <description>".$RSS_DESCRIPTION."</description>\n"); fwrite($fp, " <language>en-us</language>\n"); @@ -74,7 +75,7 @@ class RSS { fwrite($fp, " <item>\n"); fwrite($fp, " <title>".$newsentry->title."</title>\n"); fwrite($fp, " <link>".$RSS_URL."/?page=".$RSS_TARGET_PAGE."&newsid=".$newsentry->time."</link>\n"); - $content = Markdown(htmlspecialchars_decode($newsentry->description)); + $content = htmlspecialchars(Markdown(htmlspecialchars_decode($newsentry->description), true)); fwrite($fp, " <description>".$content."</description>\n"); fwrite($fp, " <pubDate>".$this->date($newsentry->time)."</pubDate>\n"); fwrite($fp, " <guid>".$RSS_URL."/?page=".$RSS_TARGET_PAGE."&newsid=".$newsentry->time."</guid>\n"); @@ -101,7 +102,7 @@ class RSS { $rssentry = new RSSEntry($param->getAttribute('title'), $param->getAttribute('time'), $param->getAttribute('category'), - $param->getAttribute('description')); + $param->textContent); $this->add($rssentry); } |