]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
meta plugin: if uuid looks like it is in fact a UUID, prepend "urn:uuid" (otherwise...
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 344620ebe9ed3f0fc74f81d0bb94d2242aed4433..9a63ea1c95cd11f9fdaa89da7d3e97ae08b8d2df 100644 (file)
@@ -70,12 +70,12 @@ sub sessioncgi () { #{{{
        my $session=shift;
 
        if ($q->param('do') eq 'blog') {
        my $session=shift;
 
        if ($q->param('do') eq 'blog') {
-               my $page=decode_utf8($q->param('title'));
-               $page=~s/\///g; # no slashes in blog posts
+               my $page=IkiWiki::titlepage(decode_utf8($q->param('title')));
+               $page=~s/(\/)/"__".ord($1)."__"/eg; # don't create subdirs
                # if the page already exists, munge it to be unique
                my $from=$q->param('from');
                my $add="";
                # if the page already exists, munge it to be unique
                my $from=$q->param('from');
                my $add="";
-               while (exists $IkiWiki::pagecase{lc($from."/".IkiWiki::titlepage($page).$add)}) {
+               while (exists $IkiWiki::pagecase{lc($from."/".$page.$add)}) {
                        $add=1 unless length $add;
                        $add++;
                }
                        $add=1 unless length $add;
                        $add++;
                }
@@ -278,7 +278,7 @@ sub preprocess_inline (@) { #{{{
                                        }
                                        if (length $config{cgiurl} && defined $type) {
                                                $template->param(have_actions => 1);
                                        }
                                        if (length $config{cgiurl} && defined $type) {
                                                $template->param(have_actions => 1);
-                                               $template->param(editurl => cgiurl(do => "edit", page => pagetitle($page, 1)));
+                                               $template->param(editurl => cgiurl(do => "edit", page => $page));
                                        }
                                }
        
                                        }
                                }
        
@@ -442,6 +442,13 @@ sub genfeed ($$$$@) { #{{{
                        mdate_3339 => date_3339($pagemtime{$p}),
                );
 
                        mdate_3339 => date_3339($pagemtime{$p}),
                );
 
+               if (exists $pagestate{$p} &&
+                   exists $pagestate{$p}{meta}{uuid}) {
+                       my $atom_id = $pagestate{$p}{meta}{uuid};
+
+                       $itemtemplate->param(uuid => $atom_id);
+               }
+
                if ($itemtemplate->query(name => "enclosure")) {
                        my $file=$pagesources{$p};
                        my $type=pagetype($file);
                if ($itemtemplate->query(name => "enclosure")) {
                        my $file=$pagesources{$p};
                        my $type=pagetype($file);