X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/cf35ee04cddd7b9b39636499dd24b689443c0e97..f707d62481052a3cba1396a681f206d9e66f67ef:/IkiWiki/Plugin/template.pm diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index c87ba5102..aa1f57c07 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -45,8 +45,18 @@ sub preprocess (@) { #{{{ return "[[template ".gettext("failed to process:")." $@]]"; } + $params{basename}=IkiWiki::basename($params{page}); + foreach my $param (keys %params) { - $template->param($param => $params{$param}); + if ($template->query(name => $param)) { + $template->param($param => + IkiWiki::htmlize($params{page}, $params{destpage}, + pagetype($pagesources{$params{page}}), + $params{$param})); + } + if ($template->query(name => "raw_$param")) { + $template->param("raw_$param" => $params{$param}); + } } return IkiWiki::preprocess($params{page}, $params{destpage},