]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/template.pm
Merge commit 'smcv/master'
[ikiwiki.git] / IkiWiki / Plugin / template.pm
index 416762fe1fc8153205b8dd7bec7f06090a9e22ed..aa1f57c0703ebcea645bb8818ef779ffaa520d1c 100644 (file)
@@ -45,10 +45,12 @@ sub preprocess (@) { #{{{
                return "[[template ".gettext("failed to process:")." $@]]";
        }
 
+       $params{basename}=IkiWiki::basename($params{page});
+
        foreach my $param (keys %params) {
                if ($template->query(name => $param)) {
                        $template->param($param =>
-                               IkiWiki::htmlize($params{page},
+                               IkiWiki::htmlize($params{page}, $params{destpage},
                                        pagetype($pagesources{$params{page}}),
                                        $params{$param}));
                }