Permalink
Browse files

[24] Moved HTML encoding to RSS specific places

We want to get non encoded output
Split function may needs some rewrite

Signed-off-by: DoesntMatter <jaed1@gmx.net>
  • Loading branch information...
DoesntMatter committed Jan 22, 2012
1 parent 50ec852 commit 9b2bdc9d9faa4a528a634d4335158933f7329e59
Showing with 5 additions and 5 deletions.
  1. +1 −1 gitlog_to_rss.pl
  2. +3 −3 headers/generic.ph
  3. +1 −1 headers/rss.ph
View
@@ -97,6 +97,6 @@
exit;
}
RSS::CreateRSS($gitlog, $options{'outfile'}, \%RSS::rss);
RSS::CreateRSS(HTML::Entities::encode($gitlog), $options{'outfile'}, \%RSS::rss);
exit;
View
@@ -20,7 +20,6 @@
# http://www.gnu.org/copyleft/gpl.html
use strict;
use HTML::Entities;
package GENERIC;
@@ -80,12 +79,13 @@ sub ParseGitLog {
return undef;
}
$result =~ s/\s+$//; # Remove trailing whitespaces
return HTML::Entities::encode($result);
return $result;
}
sub SplitCommits {
my $gitlog = shift || return undef;
my @items = split(/\n&gt;/, $gitlog);
my $seperator = shift || "\n>";
my @items = split(/$seperator/, $gitlog);
my $size = scalar @items;
my (@lines, @commit, $i);
View
@@ -65,7 +65,7 @@ sub CreateRSS {
my $gitlog = shift || return undef;
my $file = shift || return undef;
my $rss = shift || return undef;
my @items = GENERIC::SplitCommits($gitlog);
my @items = GENERIC::SplitCommits($gitlog, "\n&gt;");
my $weblink = "https://github.com";
# Header

0 comments on commit 9b2bdc9

Please sign in to comment.