]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/attachment.pm
load all plugins when generating setup
[git.ikiwiki.info.git] / IkiWiki / Plugin / attachment.pm
index 8fa330e6d2d07c54b0766b6ba5062b24bef28b68..3fe33c858ae849f7314a2e33ab9a40d946f259f6 100644 (file)
@@ -206,8 +206,10 @@ sub formbuilder (@) { #{{{
                IkiWiki::saveindex();
        }
        elsif ($form->submitted eq "Insert Links") {
+               my $page=quotemeta($q->param("page"));
                my $add="";
                foreach my $f ($q->param("attachment_select")) {
+                       $f=~s/^$page\///;
                        $add.="[[$f]]\n";
                }
                $form->field(name => 'editcontent',