Update RSS generating script:

+ use utf-8 encoding instead of iso-8859-1
+ use https links instead of http

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 4 years ago
parent 65daee6fc5
commit 923512ebaa
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -30,7 +30,7 @@ function processDir($dirname, $phpfile) {
$linestring = strip_tags($convert[$i]);
$linestring = str_replace("<", "&lt;", $linestring);
$linestring = str_replace(">", "&gt;", $linestring);
echo $linestring. "<br>\n"; //write value by index
echo $linestring. "<br/>\n"; //write value by index
}
else {
$title = $title . strip_tags($convert[$i]) . "</title>\n";
@ -43,8 +43,8 @@ function processDir($dirname, $phpfile) {
}
echo " ]]></description>\n";
// if (count($convert) > $newscollapsedlines) {
echo " <link>http://www.trinitydesktop.org/newsentry.php?entry=" . $file . "</link>\n";
echo " <guid isPermaLink=\"true\">http://www.trinitydesktop.org/newsentry.php?entry=" . $file . "</guid>\n";
echo " <link>https://www.trinitydesktop.org/newsentry.php?entry=" . $file . "</link>\n";
echo " <guid isPermaLink=\"true\">https://www.trinitydesktop.org/newsentry.php?entry=" . $file . "</guid>\n";
// }
echo " </item>\n";
}
@ -54,15 +54,14 @@ function processDir($dirname, $phpfile) {
}
}
header('Content-type: application/rss+xml');
header('Content-type: application/rss+xml; charset=utf-8');
/*echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";*/
echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>\n";
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n";
echo "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">\n";
echo " <channel>\n";
echo " <atom:link href=\"http://www.trinitydesktop.org/rss.php\" rel=\"self\" type=\"application/rss+xml\" />\n";
echo " <atom:link href=\"https://www.trinitydesktop.org/rss.php\" rel=\"self\" type=\"application/rss+xml\" />\n";
echo " <title>Trinity Desktop Environment News</title>\n";
echo " <link>http://www.trinitydesktop.org/</link>\n";
echo " <link>https://www.trinitydesktop.org/</link>\n";
echo " <description>News of the Trinity Desktop Environment, a full-featured professional desktop for Linux.</description>\n";
echo " <language>en</language>\n";
@ -73,5 +72,3 @@ echo " </channel>\n";
echo "</rss>\n";
?>

Loading…
Cancel
Save