summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-07-25 19:27:15 -0400
committerJoey Hess <joey@kodama.kitenet.net>2008-07-25 19:27:15 -0400
commitd0bd30824ec9c1f2af04d9e3d9b13473c8fcb9d8 (patch)
treec8e5e1e22adcea36326e85c2dcfd80f7e8583673 /IkiWiki/Plugin
parent1f8b0460c309c54cfbfe4152bbc195a1756cbda5 (diff)
parentb7bf566f55ec844a1d472b2efb8a2863638aacdc (diff)
Merge branch 'master' into autoconfig
Diffstat (limited to 'IkiWiki/Plugin')
-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',