[Frugalware-darcs] homepage-ng: rss: set content:encoded to a copy of the news article without tags stripped

AlexExtreme alex at alex-smith.me.uk
Sat Jun 2 14:27:40 CEST 2007


Darcsweb-Url: http://darcs.frugalware.org/darcsweb/darcsweb.cgi?r=homepage-ng;a=darcs_commitdiff;h=20070602122546-46e39-1922b59b84d6b891da9f9e9de113f5529edc3d52.gz;

[rss: set content:encoded to a copy of the news article without tags stripped
AlexExtreme <alex at alex-smith.me.uk>**20070602122546] {
hunk ./frugalware/rss.php 32
+$encoded = "";
hunk ./frugalware/rss.php 48
-		$handle['title']="Frugalware Linux ";
+		$handle['title']="Frugalware Linux Releases";
hunk ./frugalware/rss.php 115
-					"title" => $news[$i]->title[0]->tagData,
-					"link" => "http://www.frugalware.org/news/".$news[$i]->id[0]->tagData,
+					"title"   => $news[$i]->title[0]->tagData,
+					"link"    => "http://www.frugalware.org/news/".$news[$i]->id[0]->tagData,
hunk ./frugalware/rss.php 118
-					"desc" => preg_replace('/(<a href=.*>|<\/a>)/', '', $news[$i]->content[0]->tagData),
+					"desc"    => strip_tags(stripslashes($news[$i]->content[0]->tagData)),
+					"encoded" => stripslashes($news[$i]->content[0]->tagData),
hunk ./frugalware/rss.php 132
+		$encoded = " xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:admin=\"http://webns.net/mvcb/\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\"";
hunk ./frugalware/rss.php 178
+i
+
hunk ./frugalware/rss.php 182
-<rss version=\"2.0\">
+<rss version=\"2.0\"".$encoded.">
hunk ./frugalware/rss.php 194
+	if(isset($i['encoded']))
+	{
+		print "<content:encoded><![CDATA[".$i['encoded']."]]></description>\n";
+	}
}


More information about the Frugalware-darcs mailing list