summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/attachment.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm
index 8fa330e6d..3fe33c858 100644
--- a/IkiWiki/Plugin/attachment.pm
+++ b/IkiWiki/Plugin/attachment.pm
@@ -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',