$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;
$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";
} #}}}
sub pagefile ($) { #{{{
- my $page=lc(shift);
+ my $page=shift;
return "$IkiWiki::config{srcdir}/$page.html";
} #}}}