X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1f8b0460c309c54cfbfe4152bbc195a1756cbda5..6a64d133526b25b46828bc75c2b3b99c0ab7e331:/IkiWiki/Plugin/attachment.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 8fa330e6d..47e165251 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -14,9 +14,8 @@ sub import { #{{{ sub getsetup () { #{{{ return - => { + virus_checker => { type => "string", - default => "", example => "clamdscan -", description => "virus checker program (reads STDIN, returns nonzero if virus found)", safe => 0, # executed @@ -206,8 +205,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',