Merge pull request #87 from nodiscc/patch-1

rss: declare UTF-8 charset, xml content-type, add guid elements
This commit is contained in:
Tom.C. 2015-02-04 13:16:47 -05:00
commit 5d295b0ac1

View file

@ -152,7 +152,9 @@ if (is_writeable(".")) {
/*===================*/
/* XML Gen */
/*===================*/
header('Content-Type: text/xml');
$temp = explode("\n", $content);
echo "<?xml version='1.0' encoding='UTF-8 '?>\n";
echo "<rss version='2.0'>\n<channel>";
echo "<title>$title</title>";
echo "<link>$gallery_link</link>";
@ -163,6 +165,7 @@ for ($i=0; $i < $nb_items_rss && $i < count($temp); $i++) {
echo "<item>\n";
echo " <title>" . basename($temp[$i]) . "</title>\n";
echo " <link>". $temp[$i] . "</link>\n";
echo " <guid>". $temp[$i] . "</guid>\n";
echo " <description><![CDATA[ <img src='" . $temp[$i] . "'> ]]></description>\n";
echo "</item>\n";
}