X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b220a1100869bc930ed886062d95c464a0bc3689..26c2c63c97e6bfa704357503fdfd8d8834838851:/IkiWiki/Plugin/aggregate.pm diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 41ca9cce0..9c28651f0 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -70,7 +70,7 @@ sub preprocess (@) { #{{{ $feed->{name}=$name; $feed->{sourcepage}=$params{page}; $feed->{url}=$params{url}; - my $dir=exists $params{dir} ? $params{dir} : IkiWiki::titlepage($params{name}); + my $dir=exists $params{dir} ? $params{dir} : "feed/".IkiWiki::titlepage($params{name}); $dir=~s/^\/+//; ($dir)=$dir=~/$IkiWiki::config{wiki_file_regexp}/; $feed->{dir}=$dir; @@ -83,6 +83,7 @@ sub preprocess (@) { #{{{ $feed->{numposts}=0 unless defined $feed->{numposts}; $feed->{newposts}=0 unless defined $feed->{newposts}; $feed->{message}="new feed" unless defined $feed->{message}; + $feed->{tags}=[]; while (@_) { my $key=shift; my $value=shift; @@ -251,7 +252,10 @@ sub add_page (@) { #{{{ $feed->{newposts}++; # assign it an unused page - my $page=$feed->{dir}."/".IkiWiki::titlepage($params{title}); + my $page=IkiWiki::titlepage($params{title}); + $page=~s!([/])!"__".ord($1)."__"!eg; # escape slashes in title + $page=$feed->{dir}."/".$page; + $page=lc($page); ($page)=$page=~/$IkiWiki::config{wiki_file_regexp}/; if (! defined $page || ! length $page) { $page=$feed->{dir}."/item";