X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/22adebe8adf9ddf2a064c54b9c1e4c0e8799907b..26c2c63c97e6bfa704357503fdfd8d8834838851:/IkiWiki/Plugin/aggregate.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index d59f84450..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; @@ -252,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"; @@ -310,7 +313,7 @@ sub remove_feeds () { #{{{ } #}}} sub pagefile ($) { #{{{ - my $page=lc(shift); + my $page=shift; return "$IkiWiki::config{srcdir}/$page.html"; } #}}}