]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/aggregate.pm
(no commit message)
[git.ikiwiki.info.git] / IkiWiki / Plugin / aggregate.pm
index fbf88c62738d783c210d27cf6aa57c1b81c71fef..05e22a29013c92f059bc03d18d414a7c8c8ede7d 100644 (file)
@@ -571,7 +571,9 @@ sub aggregate (@) {
                        # XML::Feed doesn't work around XML::Atom's bizarre
                        # API, so we will. Real unicode strings? Yes please.
                        # See [[bugs/Aggregated_Atom_feeds_are_double-encoded]]
+                       no warnings 'once';
                        local $XML::Atom::ForceUnicode = 1;
+                       use warnings;
 
                        my $c=$entry->content;
                        # atom feeds may have no content, only a summary
@@ -619,11 +621,11 @@ sub add_page (@) {
                # escape slashes and periods in title so it doesn't specify
                # directory name or trigger ".." disallowing code.
                $page=~s!([/.])!"__".ord($1)."__"!eg;
-               $page=$feed->{dir}."/".$page;
-               ($page)=$page=~/$config{wiki_file_regexp}/;
                if (! defined $page || ! length $page) {
                        $page=$feed->{dir}."/item";
                }
+               $page=$feed->{dir}."/".$page;
+               ($page)=$page=~/$config{wiki_file_regexp}/;
                my $c="";
                while (exists $IkiWiki::pagecase{lc $page.$c} ||
                       -e $IkiWiki::Plugin::transient::transientdir."/".htmlfn($page.$c) ||