--- CVSROOT/cvs2rss.pl 2005/10/12 16:50:42 1.3 +++ CVSROOT/cvs2rss.pl 2005/10/14 14:35:43 1.4 @@ -46,18 +46,21 @@ my $description; my @title=split(",",$ARGV[0]); my $rss = new XML::RSS(version => '2.0'); + +# If rssFeed exists, parse it +if (-r "$rssFeed") { + $rss->parsefile($rssFeed); +} + $rss->channel( title=> $channelTitle, link => $channelLink, language => 'en', description => $channelTitle, - copyright => '(c) 2005 MSU Board of Trustees.' + copyright => '(c) 2005 MSU Board of Trustees.', + pubDate => $pubDate ); -# If rssFeed exists, parse it -if (-r "$rssFeed") { - $rss->parsefile($rssFeed); -} # Limit entries in the feed to $numEntries pop(@{$rss->{'items'}}) while (@{$rss->{'items'}} >= $numEntries); @@ -70,7 +73,7 @@ $title[0] =~s/ /\//; while () { chomp($_); if ($_=~/^[A-Z].*:\s*$/) { - $_ = "
" . $_ . "
"; + $_ = "
" . &HTML::Entities::encode($_,'<>&"') . "
"; } else { $_ .= "
"; @@ -100,9 +103,9 @@ if ($cvsDiff == 1) { $rss->add_item( title => "/" . $title[0] . " - " . $title[1] . "/" . $title[2], author => $author, - pubDate => $pubDate, description=> $description, - mode => 'insert' + mode => 'insert', + link => 'http://install.loncapa.org/cgi-bin/cvsweb.cgi/'.$title[0] ); foreach my $element (@{$rss->{'items'}}) {